Skip to content

Small conceptual simplification in new_run(). #2313

Small conceptual simplification in new_run().

Small conceptual simplification in new_run(). #2313

Workflow file for this run

name: CI lint
on: [push, pull_request, workflow_dispatch]
jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
node-version: ["21.x"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Set up pipx
run: |
python -m pip install --upgrade pip
python -m pip install pipx
- name: Run flake8
id: flake8
continue-on-error: true
run: |
pipx run flake8 --count --statistics --max-line-length=88 --exclude worker/packages .
- name: Run black
id: black
continue-on-error: true
run: |
pipx run black --check --exclude="packages" .
- name: Run isort
id: isort
continue-on-error: true
run: |
pipx run isort --check --profile black --skip worker/packages .
- name: Run prettier
id: prettier
continue-on-error: true
run: |
npx prettier --check "server/fishtest/static/{css/*.css,html/*.html,js/*.js}"
- name: Check linters and formatters status
run: |
if [[ "${{ steps.flake8.outcome }}" == "success" ]]; then echo "✔️ flake8"; else echo "❌ flake8"; fi
if [[ "${{ steps.black.outcome }}" == "success" ]]; then echo "✔️ black"; else echo "❌ black"; fi
if [[ "${{ steps.isort.outcome }}" == "success" ]]; then echo "✔️ isort"; else echo "❌ isort"; fi
if [[ "${{ steps.prettier.outcome }}" == "success" ]]; then echo "✔️ prettier"; else echo "❌ prettier"; fi
if [[ "${{ steps.black.outcome }}" == "failure" || "${{ steps.isort.outcome }}" == "failure" || "${{ steps.prettier.outcome }}" == "failure" ]]; then exit 1; fi
- name: Print formatting instructions
if: ${{ failure() }}
run: |
echo "Run the following commands to format the code:"
echo "pipx run black --exclude='env|packages' ."
echo "pipx run isort --profile black --skip env --skip venv --skip worker/packages ."
echo "npx prettier --write 'server/fishtest/static/{css/*.css,html/*.html,js/*.js}'"