Skip to content

Commit 271897f

Browse files
committed
adjust workflows
Signed-off-by: miigotu <[email protected]>
1 parent 187af36 commit 271897f

File tree

1 file changed

+24
-22
lines changed

1 file changed

+24
-22
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ env:
2626
DOCKER_CONTAINER_NAME: sickchill_test
2727
TARGET_PLATFORMS: "linux/amd64,linux/arm64"
2828
CRYPTOGRAPHY_DONT_BUILD_RUST: 1
29+
ACT: 0
2930

3031
defaults:
3132
run:
@@ -98,9 +99,9 @@ jobs:
9899
with:
99100
fetch-depth: 1
100101
persist-credentials: false
101-
- if: success() && startsWith(runner.os, 'Linux') && matrix.python-version == '3.10' && !env.ACT
102+
- if: startsWith(runner.os, 'Linux') && matrix.python-version == '3.11'
102103
name: Lint shell scripts
103-
uses: ludeeus/action-shellcheck@master
104+
uses: ludeeus/action-shellcheck@2.0.0
104105
with:
105106
format: diff
106107
- name: Install Poetry
@@ -117,15 +118,6 @@ jobs:
117118
python-version: ${{ matrix.python-version }}
118119
cache: "poetry"
119120
cache-dependency-path: pyproject.toml
120-
- if: success() && startsWith(runner.os, 'Linux') && matrix.python-version == '3.10'
121-
name: Set up Node
122-
uses: actions/setup-node@v3
123-
with:
124-
node-version: '16.x'
125-
cache: 'yarn'
126-
- if: success() && startsWith(runner.os, 'Linux') && matrix.python-version == '3.10'
127-
name: Install yarn
128-
run: npm install -g yarn
129121
- name: Install python dependency tools
130122
run: |
131123
poetry run pip install --upgrade setuptools wheel
@@ -136,23 +128,27 @@ jobs:
136128
- name: Install sickchill
137129
run: |
138130
poetry install --no-interaction --with dev --with speedups
139-
- if: success() && startsWith(runner.os, 'Linux') && matrix.python-version == '3.11'
140-
name: Run yarn
141-
run: poetry run poe yarn
142-
- if: success() && startsWith(runner.os, 'Linux') && matrix.python-version == '3.11'
143-
name: Lint Python
144-
run: poetry run poe lint
145-
- if: success() && startsWith(runner.os, 'Linux') && matrix.python-version == '3.11'
146-
name: Lint and test Javascript
147-
run: poetry run poe yarn test
131+
- if: startsWith(runner.os, 'Linux') && matrix.python-version == '3.11'
132+
name: Set up Node
133+
uses: actions/setup-node@v3
134+
with:
135+
node-version: '20.x'
136+
cache: 'yarn'
137+
- if: startsWith(runner.os, 'Linux') && matrix.python-version == '3.11'
138+
name: Install yarn
139+
run: |
140+
npm install -g yarn
141+
poetry run poe yarn
142+
poetry run poe lint
143+
poetry run poe yarn test
148144
- name: Test Python
149145
run: poetry run poe pytest
150146
- if: github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]'
151147
name: Coverage
152148
run: poetry run poe codecov --env OS=${{ runner.os }} Interpreter="$(poetry run python -V)" -t ${{ secrets.CODECOV_TOKEN }}
153149
Test-Docker:
154150
needs: [ Environment, Test ]
155-
runs-on: ubuntu-22.04
151+
runs-on: ubuntu-latest
156152
steps:
157153
- name: Restore environment files
158154
uses: actions/cache@v3
@@ -192,7 +188,7 @@ jobs:
192188
docker stop ${{ env.DOCKER_CONTAINER_NAME }}
193189
Deploy:
194190
needs: [ Environment, Test, Test-Docker ]
195-
runs-on: ubuntu-22.04
191+
runs-on: ubuntu-latest
196192
steps:
197193
- name: Set up QEMU
198194
uses: docker/setup-qemu-action@v3
@@ -267,3 +263,9 @@ jobs:
267263
with:
268264
name: armv7
269265
path: /tmp/sickchill-wheels/linux_arm_v7
266+
complete:
267+
name: Packaging tests completed
268+
runs-on: [ ubuntu-latest ]
269+
needs: [ Environment, Test, Test-Docker, Deploy ]
270+
steps:
271+
- run: echo "Success!"

0 commit comments

Comments
 (0)