@@ -4,16 +4,18 @@ name: Linux
44
55on :
66 push :
7- pull_request :
8- branches : ["master"]
7+
8+ permissions :
9+ actions : write
10+ contents : read
911
1012jobs :
1113 tests :
1214 name : " ubuntu-20.04 / Python ${{ matrix.config.python-version }}"
1315 runs-on : " ubuntu-20.04"
1416 continue-on-error : ${{ matrix.config.experimental }}
1517 env :
16- 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'
1719
1820 strategy :
1921 fail-fast : False
@@ -23,20 +25,33 @@ jobs:
2325 - {python-version: "3.7", testenvs: "py37,build", experimental: False}
2426 - {python-version: "3.8", testenvs: "py38,build", experimental: False}
2527 - {python-version: "3.9", testenvs: "py39,build", experimental: False}
26- - {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}
2729 - {python-version: "pypy-3.6", testenvs: "pypy36,build", experimental: False}
2830 - {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True}
2931
3032 steps :
3133 - name : Checkout 🛎️
3234 uses : " actions/checkout@v2"
3335
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+
3446 - name : Setup Python 🐍
47+ id : setup-python
48+ if : ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }}
3549 uses : " actions/setup-python@v2"
3650 with :
3751 python-version : " ${{ matrix.config.python-version }}"
3852
3953 - name : Install dependencies 🔧
54+ if : steps.setup-python.outcome == 'success'
4055 run : |
4156 python -VV
4257 python -m site
@@ -45,11 +60,12 @@ jobs:
4560 python -m pip install --upgrade coverage_pyver_pragma
4661
4762 - name : " Run Tests for Python ${{ matrix.config.python-version }}"
48- run : python -m tox -e "${{ matrix.config.testenvs }}"
63+ if : steps.setup-python.outcome == 'success'
64+ run : python -m tox -e "${{ matrix.config.testenvs }}" -s false
4965
5066 - name : " Upload Coverage 🚀"
5167 uses : actions/upload-artifact@v2
52- if : ${{ always() }}
68+ if : ${{ always() && steps.setup-python.outcome == 'success' }}
5369 with :
5470 name : " coverage-${{ matrix.config.python-version }}"
5571 path : .coverage
@@ -127,14 +143,13 @@ jobs:
127143
128144 - name : Upload distribution to PyPI 🚀
129145 if : startsWith(github.ref, 'refs/tags/')
130- uses : pypa/gh-action-pypi-publish@master
146+ uses : pypa/gh-action-pypi-publish@v1.4.2
131147 with :
132148 user : __token__
133149 password : ${{ secrets.PYPI_TOKEN }}
134150 skip_existing : true
135151
136152
137-
138153 Conda :
139154 needs : deploy
140155 runs-on : " ubuntu-20.04"
@@ -151,7 +166,7 @@ jobs:
151166 - name : Install dependencies 🔧
152167 run : |
153168 python -m pip install --upgrade pip setuptools wheel
154- python -m pip install --upgrade repo_helper
169+ python -m pip install --upgrade mkrecipe
155170
156171 wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
157172 bash miniconda.sh -b -p $HOME/miniconda
0 commit comments