Skip to content

Commit 47ccb66

Browse files
committed
fixup! chore: add pre-commit checks to CI workflow
Signed-off-by: Luiz Georg <luiz.georg@profusion.mobi>
1 parent 5589a18 commit 47ccb66

1 file changed

Lines changed: 37 additions & 18 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 37 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,6 @@ env:
1818
CI: true
1919

2020
jobs:
21-
pre-commit-checks:
22-
runs-on: ubuntu-latest
23-
steps:
24-
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
25-
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
26-
with:
27-
python-version: 3.13
28-
- name: Cache Pre-Commit Hooks
29-
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
30-
with:
31-
path: ~/.cache/pre-commit
32-
key: pre-commit-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.pre-commit-config.yaml') }}
33-
- name: Setup pre-commit
34-
run: pip install pre-commit
35-
- name: Run pre-commit hooks
36-
run: pre-commit run --all-files --show-diff-on-failure
37-
3821
setup-node:
3922
if: github.event.pull_request.draft != true
4023
runs-on: ubuntu-latest
@@ -61,6 +44,42 @@ jobs:
6144
run: pnpm install --frozen-lockfile
6245
working-directory: ./dashboard
6346

47+
pre-commit-checks:
48+
runs-on: ubuntu-latest
49+
needs: setup-node
50+
timeout-minutes: 10
51+
steps:
52+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
53+
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
54+
with:
55+
python-version: 3.12
56+
57+
- name: Fetch node_modules
58+
uses: actions/cache@v4
59+
id: fetch-node_modules
60+
with:
61+
key: node_modules-${{ runner.os }}-${{ hashFiles('./dashboard/pnpm-lock.yaml') }}
62+
path: ./dashboard/node_modules
63+
64+
- name: Install pnpm
65+
uses: pnpm/action-setup@v4
66+
with:
67+
version: 9.15.2
68+
69+
- uses: actions/setup-node@v4
70+
with:
71+
node-version-file: './dashboard/.nvmrc'
72+
73+
- name: Cache Pre-Commit Hooks
74+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
75+
with:
76+
path: ~/.cache/pre-commit
77+
key: pre-commit-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.pre-commit-config.yaml') }}
78+
- name: Setup pre-commit
79+
run: pip install pre-commit
80+
- name: Run pre-commit hooks
81+
run: pre-commit run --all-files --show-diff-on-failure
82+
6483
build-front:
6584
if: github.event.pull_request.draft != true
6685
needs: setup-node
@@ -164,7 +183,7 @@ jobs:
164183
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
165184
runs-on: ubuntu-latest
166185
needs:
167-
- lint-and-unit-test-django
186+
- unit-test-django
168187
- integration-test-django
169188
permissions:
170189
contents: write

0 commit comments

Comments
 (0)