Skip to content

Refactor act command to support threads #850

Refactor act command to support threads

Refactor act command to support threads #850

Workflow file for this run

name: Lint
on:
push:
branches:
- main
- release-*
pull_request:
branches:
- main
- release-*
env:
DEFAULT_PYTHON: "3.10"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
sa1:
name: static-analysis 1/2
runs-on: windows-2022
timeout-minutes: 60
defaults:
run:
shell: pwsh
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache: "poetry"
- name: Install dependencies
run: |
pipx runpip poetry show virtualenv
poetry run python -m pip install -U pip
poetry install --no-root
- name: pylint
if: ${{ always() }}
run: |
poetry run pylint src/bot src/update src/lib
- name: black
if: ${{ always() }}
run: |
poetry run black --check .
- name: flake8
if: ${{ always() }}
run: |
poetry run flake8 --count --show-source --statistics
sa2:
name: static-analysis 2/2
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pre-commit poetry-plugin-export
- name: pre-commit
run: |
pre-commit run --all-files
- name: gettext
if: ${{ always() }}
run: |
python "tools/pygettext.py" -p locales -d mkbot -D --no-location src/bot src/lib
git diff --exit-code ./locales/mkbot.pot