Skip to content

Commit b431836

Browse files
chore(ci): update workflows
_This PR is created by sync and will be force-pushed daily. Overwriting any manual changes done to this PR._ - Updated branch checks - Updated PR checks
1 parent 4fa18be commit b431836

File tree

2 files changed

+43
-36
lines changed

2 files changed

+43
-36
lines changed

.github/workflows/branch-checks.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@ jobs:
2020
uses: actions/setup-node@v3
2121
with:
2222
node-version: 18
23-
cache: "yarn"
23+
cache: "npm"
24+
25+
- name: Install dependencies
26+
run: npm ci
2427

2528
- name: Run format
26-
run: |
27-
yarn
28-
yarn format
29+
run: npm run format
2930

3031
test:
3132
timeout-minutes: 15
@@ -39,12 +40,13 @@ jobs:
3940
uses: actions/setup-node@v3
4041
with:
4142
node-version: 18
42-
cache: "yarn"
43+
cache: "npm"
44+
45+
- name: Install dependencies
46+
run: npm ci
4347

4448
- name: Run test
45-
run: |
46-
yarn
47-
yarn test --passWithNoTests
49+
run: npm run test --passWithNoTests
4850

4951
build:
5052
timeout-minutes: 15
@@ -58,9 +60,10 @@ jobs:
5860
uses: actions/setup-node@v3
5961
with:
6062
node-version: 18
61-
cache: "yarn"
63+
cache: "npm"
64+
65+
- name: Install dependencies
66+
run: npm ci
6267

6368
- name: Run build
64-
run: |
65-
yarn
66-
yarn build
69+
run: npm run build

.github/workflows/pr-checks.yml

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@ jobs:
1717
uses: actions/setup-node@v3
1818
with:
1919
node-version: 18
20-
cache: "yarn"
20+
cache: "npm"
21+
22+
- name: Install dependencies
23+
run: npm ci
2124

2225
- name: Run format
23-
run: |
24-
yarn install
25-
yarn format
26+
run: npm run format
2627

2728
test:
2829
timeout-minutes: 15
@@ -36,12 +37,13 @@ jobs:
3637
uses: actions/setup-node@v3
3738
with:
3839
node-version: 18
39-
cache: "yarn"
40+
cache: "npm"
41+
42+
- name: Install dependencies
43+
run: npm ci
4044

4145
- name: Run test
42-
run: |
43-
yarn install
44-
yarn test --passWithNoTests
46+
run: npm run test --passWithNoTests
4547

4648
build:
4749
timeout-minutes: 15
@@ -55,20 +57,22 @@ jobs:
5557
uses: actions/setup-node@v3
5658
with:
5759
node-version: 18
58-
cache: "yarn"
60+
cache: "npm"
5961

6062
- uses: actions/cache@v3
6163
with:
6264
path: |
6365
${{ github.workspace }}/.next/cache
64-
key: next-build-cache-${{ hashFiles('./yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
66+
key:
67+
next-build-cache-${{ hashFiles('./package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
6568
restore-keys: |
66-
next-build-cache-${{ hashFiles('./yarn.lock') }}-
69+
next-build-cache-${{ hashFiles('./package-lock.json') }}-
70+
71+
- name: Install dependencies
72+
run: npm ci
6773

6874
- name: Run build
69-
run: |
70-
yarn
71-
yarn build
75+
run: npm run build
7276

7377
e2e:
7478
timeout-minutes: 15
@@ -90,35 +94,35 @@ jobs:
9094
uses: actions/setup-node@v3
9195
with:
9296
node-version: 18
93-
cache: "yarn"
94-
cache-dependency-path: "**/yarn.lock"
97+
cache: "npm"
98+
cache-dependency-path: "**/package-lock.json"
9599

96100
- uses: actions/cache@v3
97101
with:
98102
path: |
99103
${{ github.workspace }}/frontend/.next/cache
100104
key:
101-
next-build-cache-${{ hashFiles('./frontend/yarn.lock') }}-${{ hashFiles('./frontend/**.[jt]s',
102-
'./frontend/**.[jt]sx') }}
105+
next-build-cache-${{ hashFiles('./frontend/package-lock.json') }}-${{
106+
hashFiles('./frontend/**.[jt]s', './frontend/**.[jt]sx') }}
103107
restore-keys: |
104-
next-build-cache-${{ hashFiles('./frontend/yarn.lock') }}-
108+
next-build-cache-${{ hashFiles('./frontend/package-lock.json') }}-
105109
106110
- name: Install
107111
run: |
108112
cd ./backend
109-
yarn
110-
yarn compas generate application --skip-lint
113+
npm install
114+
npx compas generate application --skip-lint
111115
cd ../frontend
112-
yarn
113-
yarn playwright install --with-deps chromium
116+
npm install
117+
npx playwright install --with-deps chromium
114118
115119
- name: Run e2e
116120
env:
117121
TENANT_ORIGIN: "scaffold.acc.lightbase.nl"
118122
TENANT_API_URL: "http://localhost:3001"
119123
run: |
120124
cd ./frontend
121-
yarn test:e2e:ci
125+
npm run test:e2e:ci
122126
123127
- name: Upload test results
124128
if: always()

0 commit comments

Comments
 (0)