@@ -5,13 +5,17 @@ name: Linux
5
5
on :
6
6
push :
7
7
8
+ permissions :
9
+ actions : write
10
+ contents : read
11
+
8
12
jobs :
9
13
tests :
10
14
name : " ubuntu-20.04 / Python ${{ matrix.config.python-version }}"
11
15
runs-on : " ubuntu-20.04"
12
16
continue-on-error : ${{ matrix.config.experimental }}
13
17
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 '
15
19
16
20
strategy :
17
21
fail-fast : False
@@ -20,18 +24,31 @@ jobs:
20
24
- {python-version: "3.7", testenvs: "py37,build", experimental: False}
21
25
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
22
26
- {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}
24
28
25
29
steps :
26
30
- name : Checkout 🛎️
27
31
uses : " actions/checkout@v2"
28
32
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
+
29
43
- name : Setup Python 🐍
44
+ id : setup-python
45
+ if : ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }}
30
46
uses : " actions/setup-python@v2"
31
47
with :
32
48
python-version : " ${{ matrix.config.python-version }}"
33
49
34
50
- name : Install dependencies 🔧
51
+ if : steps.setup-python.outcome == 'success'
35
52
run : |
36
53
python -VV
37
54
python -m site
@@ -40,11 +57,12 @@ jobs:
40
57
python -m pip install --upgrade coverage_pyver_pragma
41
58
42
59
- 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
44
62
45
63
- name : " Upload Coverage 🚀"
46
64
uses : actions/upload-artifact@v2
47
- if : ${{ always() }}
65
+ if : ${{ always() && steps.setup-python.outcome == 'success' }}
48
66
with :
49
67
name : " coverage-${{ matrix.config.python-version }}"
50
68
path : .coverage
0 commit comments