-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ci: run lint / mypy / unit tests / coverage as GH actions (#287) Make GH Action checks required * fix: exclude function target from retry deadline exceeded exception message (#318) * Exclude function target from retry deadline exceeded exception message * apply similar patch in retry_async.py Co-authored-by: Anthonios Partheniou <[email protected]> * chore: release 2.3.1 * enable checks on release branch v2.3.1 Co-authored-by: Tres Seaver <[email protected]> Co-authored-by: Chris Wilson <[email protected]>
- Loading branch information
1 parent
cb091f8
commit 13b44df
Showing
9 changed files
with
187 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
name: "Lint / Unit tests / Cover / Mypy" | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- v2.3.1 | ||
|
||
|
||
jobs: | ||
|
||
run-lint-mypy: | ||
name: lint-mypy | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install nox | ||
run: | | ||
python -m pip install --upgrade setuptools pip wheel | ||
python -m pip install nox | ||
- name: Run lint | ||
run: | | ||
nox -s lint | ||
- name: Run lint_setup_py | ||
run: | | ||
nox -s lint_setup_py | ||
- name: Run mypy | ||
run: | | ||
nox -s mypy | ||
run-unittests: | ||
name: unit${{ matrix.option }}-${{ matrix.python }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
option: ["", "_grpc_gcp", "_wo_grpc"] | ||
python: | ||
- "3.6" | ||
- "3.7" | ||
- "3.8" | ||
- "3.9" | ||
- "3.10" | ||
exclude: | ||
- option: "_wo_grpc" | ||
python: 3.7 | ||
- option: "_wo_grpc" | ||
python: 3.8 | ||
- option: "_wo_grpc" | ||
python: 3.9 | ||
|
||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install nox | ||
run: | | ||
python -m pip install --upgrade setuptools pip wheel | ||
python -m pip install nox | ||
- name: Run unit tests | ||
env: | ||
COVERAGE_FILE: .coverage${{ matrix.option }}-${{matrix.python }} | ||
run: | | ||
nox -s unit${{ matrix.option }}-${{ matrix.python }} | ||
- name: Upload coverage results | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: coverage-artifacts | ||
path: .coverage${{ matrix.option }}-${{ matrix.python }} | ||
|
||
report-coverage: | ||
name: cover | ||
runs-on: ubuntu-latest | ||
needs: | ||
- run-unittests | ||
|
||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install coverage | ||
run: | | ||
python -m pip install --upgrade setuptools pip wheel | ||
python -m pip install coverage | ||
- name: Download coverage results | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: coverage-artifacts | ||
path: .coverage-results/ | ||
|
||
- name: Report coverage results | ||
run: | | ||
coverage combine .coverage-results/.coverage* | ||
coverage report --show-missing --fail-under=100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters