Skip to content

Commit 6d58cdf

Browse files
authored
Merge pull request #2079 from umbraco/chore/build-and-test-jobs
chore: separate the build_test into two different jobs to save time
2 parents 2d4465e + 696bf4e commit 6d58cdf

File tree

2 files changed

+17
-20
lines changed

2 files changed

+17
-20
lines changed

.github/workflows/build_test.yml

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,30 @@ env:
2525
jobs:
2626
build:
2727
runs-on: ubuntu-latest
28-
29-
strategy:
30-
matrix:
31-
node-version: [20]
32-
3328
steps:
3429
- uses: actions/checkout@v4
35-
- name: Use Node.js ${{ matrix.node-version }}
30+
- name: Use Node.js
3631
uses: actions/setup-node@v4
3732
with:
38-
node-version: ${{ matrix.node-version }}
33+
node-version-file: .nvmrc
3934
cache: npm
40-
cache-dependency-path: package-lock.json
35+
cache-dependency-path: ./package-lock.json
4136
- run: npm ci --no-audit --no-fund --prefer-offline
4237
- run: npm run lint:errors
43-
- run: npm run build
38+
- run: npm run build:for:cms
4439
- run: npm run generate:jsonschema:dist
40+
41+
test:
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v4
45+
- name: Use Node.js
46+
uses: actions/setup-node@v4
47+
with:
48+
node-version-file: .nvmrc
49+
cache: npm
50+
cache-dependency-path: ./package-lock.json
51+
- run: npm ci --no-audit --no-fund --prefer-offline
4552
- run: npx playwright install --with-deps
4653
- run: npm test
4754
- name: Upload Code Coverage reports
@@ -51,13 +58,3 @@ jobs:
5158
name: code-coverage
5259
path: coverage/
5360
retention-days: 30
54-
# Commented out since it is outdated and is quite spammy
55-
# - name: Report code coverage
56-
# uses: zgosalvez/github-actions-report-lcov@v2
57-
# if: always()
58-
# continue-on-error: true
59-
# with:
60-
# coverage-files: coverage/lcov.info
61-
# artifact-name: code-coverage-report
62-
# github-token: ${{ secrets.GITHUB_TOKEN }}
63-
# working-directory: ./

src/rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const libraries = allowed.map((module) => {
8484
preventAssignment: true,
8585
values: {
8686
'?inline': '',
87-
}
87+
},
8888
}),
8989
css({ minify: true }),
9090
esbuild({ minify: true, sourceMap: true }),

0 commit comments

Comments
 (0)