diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index c8d09bec31..ff80222d09 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -26,6 +26,7 @@ env: DOCKER_CONTAINER_NAME: sickchill_test TARGET_PLATFORMS: "linux/amd64,linux/arm64" CRYPTOGRAPHY_DONT_BUILD_RUST: 1 + ACT: 0 defaults: run: @@ -98,9 +99,9 @@ jobs: with: fetch-depth: 1 persist-credentials: false - - if: success() && startsWith(runner.os, 'Linux') && matrix.python-version == '3.10' && !env.ACT + - if: startsWith(runner.os, 'Linux') && matrix.python-version == '3.11' name: Lint shell scripts - uses: ludeeus/action-shellcheck@master + uses: ludeeus/action-shellcheck@2.0.0 with: format: diff - name: Install Poetry @@ -117,15 +118,6 @@ jobs: python-version: ${{ matrix.python-version }} cache: "poetry" cache-dependency-path: pyproject.toml - - if: success() && startsWith(runner.os, 'Linux') && matrix.python-version == '3.10' - name: Set up Node - uses: actions/setup-node@v3 - with: - node-version: '16.x' - cache: 'yarn' - - if: success() && startsWith(runner.os, 'Linux') && matrix.python-version == '3.10' - name: Install yarn - run: npm install -g yarn - name: Install python dependency tools run: | poetry run pip install --upgrade setuptools wheel @@ -136,15 +128,19 @@ jobs: - name: Install sickchill run: | poetry install --no-interaction --with dev --with speedups - - if: success() && startsWith(runner.os, 'Linux') && matrix.python-version == '3.11' - name: Run yarn - run: poetry run poe yarn - - if: success() && startsWith(runner.os, 'Linux') && matrix.python-version == '3.11' - name: Lint Python - run: poetry run poe lint - - if: success() && startsWith(runner.os, 'Linux') && matrix.python-version == '3.11' - name: Lint and test Javascript - run: poetry run poe yarn test + - if: startsWith(runner.os, 'Linux') && matrix.python-version == '3.11' + name: Set up Node + uses: actions/setup-node@v3 + with: + node-version: '20.x' + cache: 'yarn' + - if: startsWith(runner.os, 'Linux') && matrix.python-version == '3.11' + name: Install yarn + run: | + npm install -g yarn + poetry run poe yarn + poetry run poe lint + poetry run poe yarn test - name: Test Python run: poetry run poe pytest - if: github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' @@ -152,7 +148,7 @@ jobs: run: poetry run poe codecov --env OS=${{ runner.os }} Interpreter="$(poetry run python -V)" -t ${{ secrets.CODECOV_TOKEN }} Test-Docker: needs: [ Environment, Test ] - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - name: Restore environment files uses: actions/cache@v3 @@ -192,7 +188,7 @@ jobs: docker stop ${{ env.DOCKER_CONTAINER_NAME }} Deploy: needs: [ Environment, Test, Test-Docker ] - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -267,3 +263,9 @@ jobs: with: name: armv7 path: /tmp/sickchill-wheels/linux_arm_v7 + complete: + name: Packaging tests completed + runs-on: [ ubuntu-latest ] + needs: [ Environment, Test, Test-Docker, Deploy ] + steps: + - run: echo "Success!"