Skip to content

Commit

Permalink
Update GitHub workflows to latest packages
Browse files Browse the repository at this point in the history
  • Loading branch information
ppigazzini committed Dec 3, 2023
1 parent 5951a33 commit 822e5b6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 17 deletions.
19 changes: 7 additions & 12 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,54 +8,49 @@ jobs:
strategy:
matrix:
python-version: ["3.11"]
node-version: ["20.x"]
node-version: ["21.x"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Set up linters and formatters
- name: Set up pipx
run: |
python -m pip install --upgrade pip
python -m pip install pipx
npm install --global prettier
- name: Run flake8
id: flake8
continue-on-error: true
run: |
pipx run flake8 --version
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 --version
pipx run black --check --exclude="packages" .
- name: Run isort
id: isort
continue-on-error: true
run: |
pipx run isort --version
pipx run isort --check --profile black --skip worker/packages .
- name: Run prettier
id: prettier
continue-on-error: true
run: |
prettier --version
prettier --check "server/fishtest/static/{css/*.css,html/*.html,js/*.js}"
npx prettier --check "server/fishtest/static/{css/*.css,html/*.html,js/*.js}"
- name: Check linters and formatters status
run: |
Expand All @@ -69,6 +64,6 @@ jobs:
if: ${{ failure() }}
run: |
echo "Run the following commands to format the code:"
echo "black --exclude='env|packages' ."
echo "isort --profile black --skip env --skip venv --skip worker/packages ."
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}'"
2 changes: 1 addition & 1 deletion .github/workflows/server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
working-directory: server

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Start MongoDB
uses: supercharge/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/worker_msys2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
mingw-w64-${{ matrix.env }}-python3
mingw-w64-${{ matrix.env }}-${{ matrix.comp }}
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -37,4 +37,4 @@ jobs:
- name: Run worker tests
run: |
python -m unittest discover -v
python -m unittest discover -vb
4 changes: 2 additions & 2 deletions .github/workflows/worker_posix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
working-directory: worker

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -29,5 +29,5 @@ jobs:
- name: Run worker tests
run: |
python -m unittest discover -v
python -m unittest discover -vb

0 comments on commit 822e5b6

Please sign in to comment.