Bump actions/setup-python from 5.1.1 to 5.3.0 #720
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python application | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.9 | |
uses: actions/[email protected] | |
with: | |
python-version: 3.9 | |
- name: Set up Poetry | |
uses: snok/install-poetry@v1 | |
- name: Install dependencies | |
run: poetry install --no-interaction --no-root | |
- name: Load pywikibot config | |
env: | |
USER_CONFIG_PY: ${{ secrets.user_config_py }} | |
run: echo $USER_CONFIG_PY > user-config.py | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
- name: Type check with mypy | |
env: | |
MYPYPATH: src | |
run: | | |
poetry run mypy . | |
- name: Test with pytest | |
run: | | |
poetry run coverage run -m pytest | |
- name: Coveralls | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.coveralls_repo_key }} | |
continue-on-error: true | |
run: | | |
poetry run coveralls | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
if: contains(github.ref, 'master') | |
steps: | |
- uses: actions/checkout@v4 | |
- name: check for dependency changes | |
run: | | |
! git diff-tree --no-commit-id --name-only -r $GITHUB_REF | grep -P "(?:Pipfile.lock|requirements(-dev)?.txt)" | |
- name: create deployment | |
uses: NiklasMerz/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
args: -o AntiCompositeNumber -r signatures -c master -e production | |
- name: set deployment status | |
uses: NiklasMerz/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
args: -o AntiCompositeNumber -r signatures -s pending -f |