Bump black from 24.4.0 to 24.4.2 #431
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] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v5 | |
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: 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: | |
- name: create deployment | |
uses: NiklasMerz/github-deployment-action@v1.3.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
args: -o AntiCompositeNumber -r anticompositetools -c master -e production | |
- name: set deployment status | |
uses: NiklasMerz/github-deployment-action@v1.3.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
args: -o AntiCompositeNumber -r anticompositetools -s pending -f |