Skip to content

Commit

Permalink
adjust workflows
Browse files Browse the repository at this point in the history
Signed-off-by: miigotu <miigotu@gmail.com>
  • Loading branch information
miigotu committed Oct 18, 2023
1 parent 187af36 commit 271897f
Showing 1 changed file with 24 additions and 22 deletions.
46 changes: 24 additions & 22 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -136,23 +128,27 @@ 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]'
name: Coverage
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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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!"

0 comments on commit 271897f

Please sign in to comment.