Skip to content

Commit a9b5993

Browse files
committed
Update publishing job config for testing
1 parent 1b2c1aa commit a9b5993

File tree

1 file changed

+43
-40
lines changed

1 file changed

+43
-40
lines changed

.github/workflows/publishing.yml

Lines changed: 43 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,38 @@
11
name: Publishing
22

3-
on:
4-
push:
5-
tags:
6-
- '*'
3+
#on:
4+
# push:
5+
# tags:
6+
# - '*'
7+
8+
on: [push, pull_request, workflow_dispatch]
79

810
jobs:
911

1012
tests:
1113
name: Run tests
12-
runs-on: ubuntu-18.04
14+
runs-on: ubuntu-20.04
1315
steps:
1416
- uses: actions/checkout@v2
1517
- uses: actions/setup-python@v2
1618
with:
17-
python-version: 3.9
19+
python-version: 3.10
1820
- run: pip install tox
1921
- run: tox
2022
env:
21-
TOXENV: 3.9
23+
TOXENV: 3.10
2224

2325
linters:
2426
name: Run linters
25-
runs-on: ubuntu-18.04
27+
runs-on: ubuntu-20.04
2628
strategy:
2729
matrix:
2830
toxenv: [flake8, pydocstyle, mypy, pylint]
2931
steps:
3032
- uses: actions/checkout@v2
3133
- uses: actions/setup-python@v2
3234
with:
33-
python-version: 3.9
35+
python-version: 3.10
3436
- run: pip install tox
3537
- run: tox
3638
env:
@@ -39,12 +41,12 @@ jobs:
3941
build-sdist:
4042
name: Build source tarball
4143
needs: [tests, linters]
42-
runs-on: ubuntu-18.04
44+
runs-on: ubuntu-20.04
4345
steps:
4446
- uses: actions/checkout@v2
4547
- uses: actions/setup-python@v2
4648
with:
47-
python-version: 3.9
49+
python-version: 3.10
4850
- run: python setup.py sdist
4951
- uses: actions/upload-artifact@v2
5052
with:
@@ -56,15 +58,15 @@ jobs:
5658
runs-on: ${{ matrix.os }}
5759
strategy:
5860
matrix:
59-
os: [ubuntu-18.04, windows-latest, macos-latest]
61+
os: [ubuntu-20.04, windows-2019, macOS-10.15]
6062
env:
6163
CIBW_SKIP: cp27-win*
6264
steps:
6365
- uses: actions/checkout@v2
6466
- uses: actions/setup-python@v2
6567
with:
66-
python-version: 3.9
67-
- run: pip install cibuildwheel==1.8.0
68+
python-version: 3.10
69+
- run: pip install cibuildwheel==2.1.3
6870
- run: cibuildwheel --output-dir wheelhouse
6971
- uses: actions/upload-artifact@v2
7072
with:
@@ -73,15 +75,15 @@ jobs:
7375
build-wheels-linux-aarch64:
7476
name: Build wheels (ubuntu-latest-aarch64)
7577
needs: [tests, linters]
76-
runs-on: ubuntu-18.04
78+
runs-on: ubuntu-20.04
7779
steps:
7880
- uses: actions/checkout@v2
7981
- name: Set up QEMU
8082
uses: docker/setup-qemu-action@v1
8183
- uses: actions/setup-python@v2
8284
with:
83-
python-version: 3.9
84-
- run: pip install cibuildwheel==1.8.0
85+
python-version: 3.10
86+
- run: pip install cibuildwheel==2.1.3
8587
- run: cibuildwheel --archs aarch64 --output-dir wheelhouse
8688
- uses: actions/upload-artifact@v2
8789
with:
@@ -90,7 +92,7 @@ jobs:
9092
publish:
9193
name: Publish on PyPI
9294
needs: [build-sdist, build-wheels, build-wheels-linux-aarch64]
93-
runs-on: ubuntu-18.04
95+
runs-on: ubuntu-20.04
9496
steps:
9597
- uses: actions/download-artifact@v2
9698
with:
@@ -99,26 +101,27 @@ jobs:
99101
- uses: pypa/gh-action-pypi-publish@master
100102
with:
101103
user: __token__
102-
password: ${{ secrets.PYPI_API_TOKEN }}
104+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
105+
repository_url: https://test.pypi.org/legacy/
103106

104-
publish-docs:
105-
name: Publish docs
106-
needs: [publish]
107-
runs-on: ubuntu-18.04
108-
steps:
109-
- uses: actions/checkout@v2
110-
- uses: actions/setup-python@v2
111-
with:
112-
python-version: 3.9
113-
- run: pip install -r requirements-doc.txt
114-
- run: pip install awscli
115-
- run: pip install -e .
116-
- run: (cd docs && make clean html)
117-
- run: |
118-
aws s3 sync docs/_build/html s3://python-dependency-injector-docs --delete
119-
aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }} --path "/*" > /dev/null
120-
echo "Cache invalidation triggered"
121-
env:
122-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
123-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
124-
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
107+
# publish-docs:
108+
# name: Publish docs
109+
# needs: [publish]
110+
# runs-on: ubuntu-18.04
111+
# steps:
112+
# - uses: actions/checkout@v2
113+
# - uses: actions/setup-python@v2
114+
# with:
115+
# python-version: 3.10
116+
# - run: pip install -r requirements-doc.txt
117+
# - run: pip install awscli
118+
# - run: pip install -e .
119+
# - run: (cd docs && make clean html)
120+
# - run: |
121+
# aws s3 sync docs/_build/html s3://python-dependency-injector-docs --delete
122+
# aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }} --path "/*" > /dev/null
123+
# echo "Cache invalidation triggered"
124+
# env:
125+
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
126+
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
127+
# AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}

0 commit comments

Comments
 (0)