-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #308 from twisted/github-actions
GitHub Actions CI config
- Loading branch information
Showing
6 changed files
with
124 additions
and
88 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,117 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.8' | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: | ||
${{ runner.os }}-pip-lint-${{ hashFiles('pyproject.toml', 'setup.py', 'tox.ini') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip-lint- | ||
${{ runner.os }}-pip- | ||
- run: python -m pip install tox | ||
|
||
- run: tox -q -p all -e flake8,towncrier,twine,check-manifest | ||
|
||
docs: | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.8" | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: | ||
${{ runner.os }}-pip-docs-${{ hashFiles('pyproject.toml', 'setup.py', 'tox.ini') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip-docs- | ||
${{ runner.os }}-pip- | ||
- run: python -m pip install tox | ||
|
||
- run: tox -q -e docs | ||
|
||
|
||
test: | ||
name: "Test ${{ matrix.python-version }} with ${{ matrix.twisted-version }} Twisted" | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 10 | ||
continue-on-error: ${{ matrix.experimental }} | ||
strategy: | ||
matrix: | ||
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "pypy-2.7", "pypy-3.7"] | ||
twisted-version: ["lowest", "latest"] | ||
experimental: [false] | ||
|
||
include: | ||
- python-version: "3.8" | ||
twisted-version: "trunk" | ||
experimental: true | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: | ||
${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml', 'setup.py', 'tox.ini') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip-${{ matrix.python-version }}- | ||
${{ runner.os }}-pip- | ||
- name: Translate Python version to Tox factor | ||
id: pyfactor | ||
shell: python | ||
run: | | ||
table = { | ||
"2.7": "py27", | ||
"3.5": "py35", | ||
"3.6": "py36", | ||
"3.7": "py37", | ||
"3.8": "py38", | ||
"3.9": "py39", | ||
"pypy-2.7": "pypy", | ||
"pypy-3.7": "pypy3", | ||
} | ||
factor = table["${{ matrix.python-version }}"] | ||
print("::set-output name=value::" + factor) | ||
- run: python -m pip install tox coveralls | ||
|
||
- run: tox -e ${{ steps.pyfactor.outputs.value }}-twisted_${{ matrix.twisted-version }} | ||
|
||
- run: coveralls | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
COVERALLS_REPO_TOKEN: 4nctuKHTnVtbdmty2FgdO3iiWm1nb7xc4 | ||
COVERALLS_FLAG_NAME: python_${{ matrix.python-version }}-twisted_${{ matrix.twisted-version }} | ||
COVERALLS_PARALLEL: true |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
The minimum supported Twisted version has increased to 18.7.0. Older versions are no longer tested in CI. |
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