-
-
Notifications
You must be signed in to change notification settings - Fork 610
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI workflow for GitHub Actions (#1012)
Co-Authored-By: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
- Loading branch information
Showing
6 changed files
with
164 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
schedule: | ||
# Run everyday at 03:53 UTC | ||
- cron: 53 3 * * * | ||
|
||
jobs: | ||
test: | ||
name: ${{ matrix.os }} / ${{ matrix.python-version }} / ${{ matrix.pip-version }} | ||
runs-on: ${{ matrix.os }}-latest | ||
strategy: | ||
matrix: | ||
os: | ||
- Ubuntu | ||
- Windows | ||
- MacOS | ||
python-version: | ||
- 3.8 | ||
- 2.7 | ||
- 3.5 | ||
- 3.6 | ||
- 3.7 | ||
pip-version: | ||
- "latest" | ||
- "20.0" | ||
env: | ||
PY_COLORS: 1 | ||
TOXENV: pip${{ matrix.pip-version }}-coverage | ||
TOX_PARALLEL_NO_SPINNER: 1 | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install tox | ||
run: pip install tox | ||
- name: Prepare test environment | ||
run: tox --notest -p auto --parallel-live | ||
- name: Test pip ${{ matrix.pip-version }} | ||
run: tox | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1.0.6 | ||
with: | ||
file: ./coverage.xml | ||
name: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.pip-version }} |
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 |
---|---|---|
@@ -1,28 +1,73 @@ | ||
name: cron | ||
name: Cron | ||
|
||
on: | ||
schedule: | ||
# Run every day at 00:00 UTC | ||
- cron: 0 0 * * * | ||
# Run every day at 00:00 UTC | ||
- cron: 0 0 * * * | ||
|
||
jobs: | ||
test: | ||
master: | ||
name: ${{ matrix.os }} / ${{ matrix.python-version }} / ${{ matrix.pip-version }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
python-version: [2.7, 3.5, 3.6, 3.7, 3.8] | ||
env: | ||
- TOXENV: pipmaster | ||
os: [ubuntu-latest, windows-latest] | ||
os: | ||
- Ubuntu | ||
- Windows | ||
- MacOS | ||
python-version: | ||
- 3.8 | ||
- 2.7 | ||
- 3.5 | ||
- 3.6 | ||
- 3.7 | ||
pip-version: | ||
- master | ||
env: | ||
PY_COLORS: 1 | ||
TOXENV: pip${{ matrix.pip-version }} | ||
TOX_PARALLEL_NO_SPINNER: 1 | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install tox | ||
run: pip install tox | ||
- name: Prepare test environment | ||
run: tox --notest -p auto --parallel-live | ||
- name: Test pip ${{ matrix.pip-version }} | ||
run: tox | ||
|
||
pypy: | ||
name: ${{ matrix.os }} / ${{ matrix.python-version }} / ${{ matrix.pip-version }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- Ubuntu | ||
- MacOS | ||
# TODO: fix test_realistic_complex_sub_dependencies test on Windows | ||
# - Windows | ||
python-version: | ||
- pypy3 | ||
- pypy2 | ||
pip-version: | ||
- latest | ||
env: | ||
PY_COLORS: 1 | ||
TOXENV: pip${{ matrix.pip-version }} | ||
TOX_PARALLEL_NO_SPINNER: 1 | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install tox | ||
run: pip install tox | ||
- name: Test with tox ${{ matrix.env.TOXENV }} | ||
- name: Prepare test environment | ||
run: tox --notest -p auto --parallel-live | ||
- name: Test pip ${{ matrix.pip-version }} | ||
run: tox | ||
env: ${{ matrix.env }} |
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,43 @@ | ||
name: QA | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
|
||
jobs: | ||
qa: | ||
name: ${{ matrix.toxenv }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
toxenv: | ||
- checkqa | ||
- readme | ||
python-version: | ||
- "3.x" | ||
env: | ||
PY_COLORS: 1 | ||
TOXENV: ${{ matrix.toxenv }} | ||
TOX_PARALLEL_NO_SPINNER: 1 | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Prepare cache key | ||
id: cache-key | ||
run: echo "::set-output name=sha-256::$(python -VV | sha256sum | cut -d' ' -f1)" | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pre-commit | ||
key: pre-commit|${{ steps.cache-key.outputs.sha-256 }}|${{ hashFiles('.pre-commit-config.yaml') }} | ||
- name: Install tox | ||
run: pip install tox | ||
- name: Prepare test environment | ||
run: tox --notest -p auto --parallel-live | ||
- name: Test ${{ matrix.toxenv }} | ||
run: tox |
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