@@ -12,16 +12,18 @@ jobs:
1212 fail-fast : false
1313 matrix :
1414 include :
15- - { python-version: 3.8, os: ubuntu-latest, session: "pre-commit" }
16- - { python-version: 3.8, os: ubuntu-latest, session: "safety" }
15+ - { python-version: 3.9, os: ubuntu-latest, session: "pre-commit" }
16+ - { python-version: 3.9, os: ubuntu-latest, session: "safety" }
17+ - { python-version: 3.9, os: ubuntu-latest, session: "mypy" }
1718 - { python-version: 3.8, os: ubuntu-latest, session: "mypy" }
1819 - { python-version: 3.7, os: ubuntu-latest, session: "mypy" }
20+ - { python-version: 3.9, os: ubuntu-latest, session: "tests" }
1921 - { python-version: 3.8, os: ubuntu-latest, session: "tests" }
2022 - { python-version: 3.7, os: ubuntu-latest, session: "tests" }
21- - { python-version: 3.8 , os: windows-latest, session: "tests" }
22- - { python-version: 3.8 , os: macos-latest, session: "tests" }
23- # - { python-version: 3.8 , os: ubuntu-latest, session: "typeguard" }
24- - { python-version: 3.8 , os: ubuntu-latest, session: "docs-build" }
23+ - { python-version: 3.9 , os: windows-latest, session: "tests" }
24+ - { python-version: 3.9 , os: macos-latest, session: "tests" }
25+ # - { python-version: 3.9 , os: ubuntu-latest, session: "typeguard" }
26+ - { python-version: 3.9 , os: ubuntu-latest, session: "docs-build" }
2527
2628 env :
2729 NOXSESSION : ${{ matrix.session }}
31333234
3335 - name : Set up Python ${{ matrix.python-version }}
34- uses : actions/setup-python@v2.2.1
36+ uses : actions/setup-python@v2.1.4
3537 with :
3638 python-version : ${{ matrix.python-version }}
3739
4749
4850 - name : Install Nox
4951 run : |
50- pip install --constraint=.github/workflows/constraints.txt nox
52+ pip install --constraint=.github/workflows/constraints.txt nox nox-poetry
5153 nox --version
5254
5355 - name : Compute pre-commit cache key
6668 print("::set-output name=result::{}".format(result))
6769
6870 - name : Restore pre-commit cache
69- uses : actions/cache@v2
71+ uses : actions/cache@v2.1.3
7072 if : matrix.session == 'pre-commit'
7173 with :
7274 path : ~/.cache/pre-commit
@@ -78,18 +80,59 @@ jobs:
7880 run : |
7981 nox --force-color --python=${{ matrix.python-version }}
8082
83+ - name : Upload coverage data
84+ if : always() && matrix.session == 'tests'
85+ 86+ with :
87+ name : coverage-data
88+ path : " .coverage.*"
89+
8190 - name : Upload documentation
8291 if : matrix.session == 'docs-build'
83- uses : actions/upload-artifact@v2
92+ uses : actions/upload-artifact@v2.2.1
8493 with :
8594 name : docs
8695 path : docs/_build
8796
97+ coverage :
98+ runs-on : ubuntu-latest
99+ needs : tests
100+ steps :
101+ - name : Check out the repository
102+ 103+
104+ - name : Set up Python 3.9
105+ 106+ with :
107+ python-version : 3.9
108+
109+ - name : Upgrade pip
110+ run : |
111+ pip install --constraint=.github/workflows/constraints.txt pip
112+ pip --version
113+
114+ - name : Install Poetry
115+ run : |
116+ pip install --constraint=.github/workflows/constraints.txt poetry
117+ poetry --version
118+
119+ - name : Install Nox
120+ run : |
121+ pip install --constraint=.github/workflows/constraints.txt nox nox-poetry
122+ nox --version
123+
124+ - name : Download coverage data
125+ 126+ with :
127+ name : coverage-data
128+
129+ - name : Combine coverage data and display human readable report
130+ run : |
131+ nox --force-color --session=coverage
132+
88133 - name : Create coverage report
89- if : always() && matrix.session == 'tests'
90134 run : |
91135 nox --force-color --session=coverage -- xml
92136
93137 - name : Upload coverage report
94- if : always() && matrix.session == 'tests'
95- 138+
0 commit comments