@@ -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.6,3.7,3.8,3.9,3.10.0-alpha.6 ,pypy-3.6,pypy-3.7'
18+ USING_COVERAGE : ' 3.6,3.7,3.8,3.9,3.10.0-beta.1 ,pypy-3.6,pypy-3.7'
1519
1620 strategy :
1721 fail-fast : False
@@ -21,20 +25,33 @@ jobs:
2125 - {python-version: "3.7", testenvs: "py37,build", experimental: False}
2226 - {python-version: "3.8", testenvs: "py38,build", experimental: False}
2327 - {python-version: "3.9", testenvs: "py39,build", experimental: False}
24- - {python-version: "3.10.0-alpha.6 ", testenvs: "py310-dev,build", experimental: True}
28+ - {python-version: "3.10.0-beta.1 ", testenvs: "py310-dev,build", experimental: True}
2529 - {python-version: "pypy-3.6", testenvs: "pypy36,build", experimental: False}
2630 - {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True}
2731
2832 steps :
2933 - name : Checkout 🛎️
3034 uses : " actions/checkout@v2"
3135
36+ - name : Check for changed files
37+ if : startsWith(github.ref, 'refs/tags/') != true
38+ uses : dorny/paths-filter@v2
39+ id : changes
40+ with :
41+ list-files : " json"
42+ filters : |
43+ code:
44+ - '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)'
45+
3246 - name : Setup Python 🐍
47+ id : setup-python
48+ if : ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }}
3349 uses : " actions/setup-python@v2"
3450 with :
3551 python-version : " ${{ matrix.config.python-version }}"
3652
3753 - name : Install dependencies 🔧
54+ if : steps.setup-python.outcome == 'success'
3855 run : |
3956 python -VV
4057 python -m site
@@ -43,11 +60,12 @@ jobs:
4360 python -m pip install --upgrade coverage_pyver_pragma
4461
4562 - name : " Run Tests for Python ${{ matrix.config.python-version }}"
63+ if : steps.setup-python.outcome == 'success'
4664 run : python -m tox -e "${{ matrix.config.testenvs }}"
4765
4866 - name : " Upload Coverage 🚀"
4967 uses : actions/upload-artifact@v2
50- if : ${{ always() }}
68+ if : ${{ always() && steps.setup-python.outcome == 'success' }}
5169 with :
5270 name : " coverage-${{ matrix.config.python-version }}"
5371 path : .coverage
0 commit comments