chore: separate the build_test into two different jobs to save time
This commit is contained in:
40
src/Umbraco.Web.UI.Client/.github/workflows/build.yml
vendored
Normal file
40
src/Umbraco.Web.UI.Client/.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- release/*
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- release/*
|
||||
|
||||
# Allows GitHub to use this workflow to validate the merge queue
|
||||
merge_group:
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=16384
|
||||
|
||||
jobs:
|
||||
build:
|
||||
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: npm run lint:errors
|
||||
- run: npm run build:for:npm
|
||||
- run: npm run generate:jsonschema:dist
|
||||
@@ -1,7 +1,7 @@
|
||||
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: Build and test
|
||||
name: Test
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -26,21 +26,15 @@ 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 }}
|
||||
cache: 'npm'
|
||||
node-version-file: .nvmrc
|
||||
cache: npm
|
||||
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 generate:jsonschema:dist
|
||||
- run: npx playwright install --with-deps
|
||||
- run: npm test
|
||||
- name: Upload Code Coverage reports
|
||||
@@ -50,13 +44,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: ./
|
||||
Reference in New Issue
Block a user