-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate GitHub Actions CI/CD tests #1840
Merged
jaraco
merged 5 commits into
pypa:master
from
webknjaz:features/integrate-github-actions-ci-cd--tests
Jan 13, 2020
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7fa2fcf
Add GitHub Actions CI/CD test suite workflow
webknjaz 67dd74a
Temporary comment out win jobs
webknjaz 440238e
Don't skip missing interpreters in tox
webknjaz e5e5ab2
Add Python 3.8 to the test matrix
webknjaz 23dce8b
Upgrade the macOS VMs to use a new supported version
webknjaz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,76 @@ | ||
name: Test suite | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: 1 0 * * * # Run daily at 0:01 UTC | ||
|
||
jobs: | ||
tests: | ||
name: 👷 | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
# max-parallel: 5 | ||
matrix: | ||
python-version: | ||
- 3.8 | ||
- 3.7 | ||
webknjaz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- 3.6 | ||
- 3.5 | ||
- 2.7 | ||
os: | ||
- ubuntu-18.04 | ||
- ubuntu-16.04 | ||
- macOS-latest | ||
# - windows-2019 | ||
# - windows-2016 | ||
env: | ||
- TOXENV: python | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
version: ${{ matrix.python-version }} | ||
- name: Upgrade pip/setuptools/wheel | ||
run: >- | ||
python | ||
-m pip install | ||
--disable-pip-version-check | ||
--upgrade | ||
pip setuptools wheel | ||
- name: Install tox | ||
run: >- | ||
python -m pip install --upgrade tox tox-venv | ||
- name: Log installed dists | ||
run: >- | ||
python -m pip freeze --all | ||
- name: Log env vars | ||
run: >- | ||
env | ||
env: ${{ matrix.env }} | ||
|
||
- name: Update egg_info based on setup.py in checkout | ||
run: >- | ||
python -m bootstrap | ||
env: ${{ matrix.env }} | ||
- name: Verify that there's no cached Python modules in sources | ||
if: >- | ||
! startsWith(matrix.os, 'windows-') | ||
run: >- | ||
! grep pyc setuptools.egg-info/SOURCES.txt | ||
|
||
- name: 'Initialize tox envs: ${{ matrix.env.TOXENV }}' | ||
run: | | ||
python -m tox --parallel auto --notest --skip-missing-interpreters false | ||
env: ${{ matrix.env }} | ||
- name: Test with tox | ||
run: | | ||
${{ startsWith(matrix.os, 'windows-') && 'setx NETWORK_REQUIRED ' || 'export NETWORK_REQUIRED=' }}1 | ||
python -m tox \ | ||
--parallel 0 \ | ||
-- \ | ||
--cov | ||
env: ${{ matrix.env }} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's important to note that by default any job failure will cause all other jobs in the workflow to be canceled. If you don't want that, apply this patch:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've found this useful, especially if there's a network-related timeout in one job.