Skip to content

Commit

Permalink
Merge pull request #2079 from umbraco/chore/build-and-test-jobs
Browse files Browse the repository at this point in the history
chore: separate the build_test into two different jobs to save time
  • Loading branch information
iOvergaard authored Jul 3, 2024
2 parents 2d4465e + 696bf4e commit 6d58cdf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 20 deletions.
35 changes: 16 additions & 19 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,30 @@ env:
jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20]

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version-file: .nvmrc
cache: npm
cache-dependency-path: package-lock.json
cache-dependency-path: ./package-lock.json
- run: npm ci --no-audit --no-fund --prefer-offline
- run: npm run lint:errors
- run: npm run build
- run: npm run build:for:cms
- run: npm run generate:jsonschema:dist

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: ./package-lock.json
- run: npm ci --no-audit --no-fund --prefer-offline
- run: npx playwright install --with-deps
- run: npm test
- name: Upload Code Coverage reports
Expand All @@ -51,13 +58,3 @@ jobs:
name: code-coverage
path: coverage/
retention-days: 30
# Commented out since it is outdated and is quite spammy
# - name: Report code coverage
# uses: zgosalvez/github-actions-report-lcov@v2
# if: always()
# continue-on-error: true
# with:
# coverage-files: coverage/lcov.info
# artifact-name: code-coverage-report
# github-token: ${{ secrets.GITHUB_TOKEN }}
# working-directory: ./
2 changes: 1 addition & 1 deletion src/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const libraries = allowed.map((module) => {
preventAssignment: true,
values: {
'?inline': '',
}
},
}),
css({ minify: true }),
esbuild({ minify: true, sourceMap: true }),
Expand Down

0 comments on commit 6d58cdf

Please sign in to comment.