From 416f2d0f2eabcf9df80c56b2182e9e1ae7e47b30 Mon Sep 17 00:00:00 2001 From: Liuyang Wan Date: Mon, 27 Jul 2020 12:15:38 +0800 Subject: [PATCH] Various Github Action improvement (#1610) --- .github/workflows/{check.yml => ci.yml} | 16 ++++++++-------- .../{python-publish.yml => pypi-release.yml} | 2 +- README.md | 2 +- codecov.yml | 2 ++ 4 files changed, 12 insertions(+), 10 deletions(-) rename .github/workflows/{check.yml => ci.yml} (72%) rename .github/workflows/{python-publish.yml => pypi-release.yml} (98%) create mode 100644 codecov.yml diff --git a/.github/workflows/check.yml b/.github/workflows/ci.yml similarity index 72% rename from .github/workflows/check.yml rename to .github/workflows/ci.yml index 2722e895..f656c47e 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/ci.yml @@ -1,16 +1,18 @@ -name: check +name: CI on: - pull_request: push: + branches: master + pull_request: jobs: - check: + test: runs-on: ubuntu-latest + name: test (Python ${{ matrix.python-version }}) strategy: matrix: python-version: [3.5, 3.6, 3.7, 3.8] steps: - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} + - name: Set up Python uses: actions/setup-python@v2 with: python-version: "${{ matrix.python-version }}" @@ -18,10 +20,8 @@ jobs: run: | python -m pip install --upgrade pip pip install tox tox-gh-actions - - name: Test with tox + - name: Run tests run: tox - name: Upload coverage to Codecov - if: matrix.python-version == 3.6 uses: codecov/codecov-action@v1 - with: - file: ./coverage.xml + diff --git a/.github/workflows/python-publish.yml b/.github/workflows/pypi-release.yml similarity index 98% rename from .github/workflows/python-publish.yml rename to .github/workflows/pypi-release.yml index 001bcca7..11d4f717 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/pypi-release.yml @@ -3,7 +3,7 @@ on: release: types: [created] jobs: - deploy: + publish: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/README.md b/README.md index c68d398c..6e383244 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # PyGitHub [![PyPI](https://img.shields.io/pypi/v/PyGithub.svg)](https://pypi.python.org/pypi/PyGithub) -![check](https://github.com/PyGithub/PyGithub/workflows/check/badge.svg) +![CI](https://github.com/PyGithub/PyGithub/workflows/CI/badge.svg) [![readthedocs](https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat)](https://pygithub.readthedocs.io/en/latest/?badge=latest) [![License](https://img.shields.io/badge/license-LGPL-blue.svg)](https://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License) [![Slack](https://img.shields.io/badge/Slack%20channel-%20%20-blue.svg)](https://join.slack.com/t/pygithub-project/shared_invite/zt-duj89xtx-uKFZtgAg209o6Vweqm8xeQ) diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000..0f65dcd5 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,2 @@ +comment: + after_n_builds: 4