mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-02-27 00:50:40 +03:00
Update publishing job config for testing
This commit is contained in:
parent
1b2c1aa3b7
commit
a9b599372c
83
.github/workflows/publishing.yml
vendored
83
.github/workflows/publishing.yml
vendored
|
@ -1,28 +1,30 @@
|
||||||
name: Publishing
|
name: Publishing
|
||||||
|
|
||||||
on:
|
#on:
|
||||||
push:
|
# push:
|
||||||
tags:
|
# tags:
|
||||||
- '*'
|
# - '*'
|
||||||
|
|
||||||
|
on: [push, pull_request, workflow_dispatch]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
tests:
|
tests:
|
||||||
name: Run tests
|
name: Run tests
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: 3.10
|
||||||
- run: pip install tox
|
- run: pip install tox
|
||||||
- run: tox
|
- run: tox
|
||||||
env:
|
env:
|
||||||
TOXENV: 3.9
|
TOXENV: 3.10
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
name: Run linters
|
name: Run linters
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-20.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
toxenv: [flake8, pydocstyle, mypy, pylint]
|
toxenv: [flake8, pydocstyle, mypy, pylint]
|
||||||
|
@ -30,7 +32,7 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: 3.10
|
||||||
- run: pip install tox
|
- run: pip install tox
|
||||||
- run: tox
|
- run: tox
|
||||||
env:
|
env:
|
||||||
|
@ -39,12 +41,12 @@ jobs:
|
||||||
build-sdist:
|
build-sdist:
|
||||||
name: Build source tarball
|
name: Build source tarball
|
||||||
needs: [tests, linters]
|
needs: [tests, linters]
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: 3.10
|
||||||
- run: python setup.py sdist
|
- run: python setup.py sdist
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
|
@ -56,15 +58,15 @@ jobs:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-18.04, windows-latest, macos-latest]
|
os: [ubuntu-20.04, windows-2019, macOS-10.15]
|
||||||
env:
|
env:
|
||||||
CIBW_SKIP: cp27-win*
|
CIBW_SKIP: cp27-win*
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: 3.10
|
||||||
- run: pip install cibuildwheel==1.8.0
|
- run: pip install cibuildwheel==2.1.3
|
||||||
- run: cibuildwheel --output-dir wheelhouse
|
- run: cibuildwheel --output-dir wheelhouse
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
|
@ -73,15 +75,15 @@ jobs:
|
||||||
build-wheels-linux-aarch64:
|
build-wheels-linux-aarch64:
|
||||||
name: Build wheels (ubuntu-latest-aarch64)
|
name: Build wheels (ubuntu-latest-aarch64)
|
||||||
needs: [tests, linters]
|
needs: [tests, linters]
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v1
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: 3.10
|
||||||
- run: pip install cibuildwheel==1.8.0
|
- run: pip install cibuildwheel==2.1.3
|
||||||
- run: cibuildwheel --archs aarch64 --output-dir wheelhouse
|
- run: cibuildwheel --archs aarch64 --output-dir wheelhouse
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
|
@ -90,7 +92,7 @@ jobs:
|
||||||
publish:
|
publish:
|
||||||
name: Publish on PyPI
|
name: Publish on PyPI
|
||||||
needs: [build-sdist, build-wheels, build-wheels-linux-aarch64]
|
needs: [build-sdist, build-wheels, build-wheels-linux-aarch64]
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v2
|
- uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
|
@ -99,26 +101,27 @@ jobs:
|
||||||
- uses: pypa/gh-action-pypi-publish@master
|
- uses: pypa/gh-action-pypi-publish@master
|
||||||
with:
|
with:
|
||||||
user: __token__
|
user: __token__
|
||||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
||||||
|
repository_url: https://test.pypi.org/legacy/
|
||||||
|
|
||||||
publish-docs:
|
# publish-docs:
|
||||||
name: Publish docs
|
# name: Publish docs
|
||||||
needs: [publish]
|
# needs: [publish]
|
||||||
runs-on: ubuntu-18.04
|
# runs-on: ubuntu-18.04
|
||||||
steps:
|
# steps:
|
||||||
- uses: actions/checkout@v2
|
# - uses: actions/checkout@v2
|
||||||
- uses: actions/setup-python@v2
|
# - uses: actions/setup-python@v2
|
||||||
with:
|
# with:
|
||||||
python-version: 3.9
|
# python-version: 3.10
|
||||||
- run: pip install -r requirements-doc.txt
|
# - run: pip install -r requirements-doc.txt
|
||||||
- run: pip install awscli
|
# - run: pip install awscli
|
||||||
- run: pip install -e .
|
# - run: pip install -e .
|
||||||
- run: (cd docs && make clean html)
|
# - run: (cd docs && make clean html)
|
||||||
- run: |
|
# - run: |
|
||||||
aws s3 sync docs/_build/html s3://python-dependency-injector-docs --delete
|
# aws s3 sync docs/_build/html s3://python-dependency-injector-docs --delete
|
||||||
aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }} --path "/*" > /dev/null
|
# aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }} --path "/*" > /dev/null
|
||||||
echo "Cache invalidation triggered"
|
# echo "Cache invalidation triggered"
|
||||||
env:
|
# env:
|
||||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
|
# AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user