Skip to content

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #42

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #42

Workflow file for this run

name: CI
on:
pull_request:
branches:
- master
push:
branches:
- master
release:
types: published
jobs:
black:
name: Format
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.10"
- uses: actions/cache@v2
with:
path: ~/Library/Caches/pip
key: pip-${{ hashFiles('requirements*.txt') }}
restore-keys: pip-
- run: pip install --upgrade --requirement requirements-pre.txt
- run: pip install --upgrade --requirement requirements.txt
- run: black --check --diff .
mypy:
name: Typecheck
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.10"
- uses: actions/cache@v2
with:
path: ~/Library/Caches/pip
key: pip-${{ hashFiles('requirements*.txt') }}
restore-keys: pip-
- run: pip install --upgrade --requirement requirements-pre.txt
- run: pip install --upgrade --requirement requirements.txt
- run: mypy
pylint:
name: Lint
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.10"
- uses: actions/cache@v2
with:
path: ~/Library/Caches/pip
key: pip-${{ hashFiles('requirements*.txt') }}
restore-keys: pip-
- run: pip install --upgrade --requirement requirements-pre.txt
- run: pip install --upgrade --requirement requirements.txt
- run: pylint hax setup
pytest:
name: Test / Python ${{ matrix.python }}
strategy:
fail-fast: false
matrix:
python: ["3.7", "3.8", "3.9", "3.10"]
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- uses: actions/cache@v2
with:
path: ~/Library/Caches/pip
key: pip-${{ hashFiles('requirements*.txt') }}
restore-keys: pip-
- run: pip install --upgrade --requirement requirements-pre.txt
- run: pip install --upgrade --requirement requirements.txt
- run: pytest
setup:
name: Package
needs: [black, mypy, pylint, pytest]
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.10"
- uses: actions/cache@v2
with:
path: ~/Library/Caches/pip
key: pip-${{ hashFiles('requirements-pre.txt') }}
restore-keys: pip-
- run: pip install --upgrade --requirement requirements-pre.txt
- run: python setup.py sdist bdist_wheel
- uses: actions/upload-artifact@v2
with:
name: dist
path: dist
publish:
name: Publish
if: github.event_name == 'release' && github.event.action == 'published'
needs: [setup]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4.1.7
with:
name: dist
path: dist
- uses: pypa/gh-action-pypi-publish@v1.4.2
with:
password: ${{ secrets.PYPI_TOKEN }}
skip_existing: true