diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 291521f7d..396d81ba9 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -8,10 +8,10 @@ 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 @@ -19,43 +19,38 @@ jobs: 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: | @@ -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}'" diff --git a/.github/workflows/server.yaml b/.github/workflows/server.yaml index 6db6cfb08..39746ae2b 100644 --- a/.github/workflows/server.yaml +++ b/.github/workflows/server.yaml @@ -13,7 +13,7 @@ jobs: working-directory: server steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Start MongoDB uses: supercharge/mongodb-github-action@1.10.0 diff --git a/.github/workflows/worker_msys2.yaml b/.github/workflows/worker_msys2.yaml index 34bc57fa2..3e11905c0 100644 --- a/.github/workflows/worker_msys2.yaml +++ b/.github/workflows/worker_msys2.yaml @@ -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 @@ -37,4 +37,4 @@ jobs: - name: Run worker tests run: | - python -m unittest discover -v + python -m unittest discover -vb diff --git a/.github/workflows/worker_posix.yaml b/.github/workflows/worker_posix.yaml index bf2fa1c70..6ede9592a 100644 --- a/.github/workflows/worker_posix.yaml +++ b/.github/workflows/worker_posix.yaml @@ -14,7 +14,7 @@ jobs: working-directory: worker steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 @@ -29,5 +29,5 @@ jobs: - name: Run worker tests run: | - python -m unittest discover -v + python -m unittest discover -vb