@@ -5,13 +5,17 @@ name: Linux
55on :
66 push :
77
8+ permissions :
9+ actions : write
10+ contents : read
11+
812jobs :
913 tests :
1014 name : " ubuntu-20.04 / Python ${{ matrix.config.python-version }}"
1115 runs-on : " ubuntu-20.04"
1216 continue-on-error : ${{ matrix.config.experimental }}
1317 env :
14- USING_COVERAGE : ' 3.7,3.8,3.9,3.10.0-alpha.7 '
18+ USING_COVERAGE : ' 3.7,3.8,3.9,3.10.0-beta.1 '
1519
1620 strategy :
1721 fail-fast : False
@@ -20,18 +24,31 @@ jobs:
2024 - {python-version: "3.7", testenvs: "py37,build", experimental: False}
2125 - {python-version: "3.8", testenvs: "py38,build", experimental: False}
2226 - {python-version: "3.9", testenvs: "py39,build", experimental: False}
23- - {python-version: "3.10.0-alpha.7 ", testenvs: "py310-dev,build", experimental: True}
27+ - {python-version: "3.10.0-beta.1 ", testenvs: "py310-dev,build", experimental: True}
2428
2529 steps :
2630 - name : Checkout 🛎️
2731 uses : " actions/checkout@v2"
2832
33+ - name : Check for changed files
34+ if : startsWith(github.ref, 'refs/tags/') != true
35+ uses : dorny/paths-filter@v2
36+ id : changes
37+ with :
38+ list-files : " json"
39+ filters : |
40+ code:
41+ - '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)'
42+
2943 - name : Setup Python 🐍
44+ id : setup-python
45+ if : ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }}
3046 uses : " actions/setup-python@v2"
3147 with :
3248 python-version : " ${{ matrix.config.python-version }}"
3349
3450 - name : Install dependencies 🔧
51+ if : steps.setup-python.outcome == 'success'
3552 run : |
3653 python -VV
3754 python -m site
@@ -40,11 +57,12 @@ jobs:
4057 python -m pip install --upgrade coverage_pyver_pragma
4158
4259 - name : " Run Tests for Python ${{ matrix.config.python-version }}"
43- run : python -m tox -e "${{ matrix.config.testenvs }}"
60+ if : steps.setup-python.outcome == 'success'
61+ run : python -m tox -e "${{ matrix.config.testenvs }}" -s false
4462
4563 - name : " Upload Coverage 🚀"
4664 uses : actions/upload-artifact@v2
47- if : ${{ always() }}
65+ if : ${{ always() && steps.setup-python.outcome == 'success' }}
4866 with :
4967 name : " coverage-${{ matrix.config.python-version }}"
5068 path : .coverage
0 commit comments