Skip to content

Bump the npm-dependencies-minor group across 1 directory with 22 updates #374

Bump the npm-dependencies-minor group across 1 directory with 22 updates

Bump the npm-dependencies-minor group across 1 directory with 22 updates #374

Workflow file for this run

name: CI Build
on:
push:
paths-ignore:
- "**.md"
- "LICENSE.txt"
pull_request:
branches:
- main
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
- name: Setup Node
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 20.x
cache: npm
- name: Install dependencies
run: npm ci
- name: Run linting
run: npm run lint
- name: Build application
run: npm run build:prod
- name: Run unit tests
id: unit-tests
run: npm run test:prod
- name: Upload Test Result Report
if: steps.unit-tests.conclusion != 'skipped'
uses: dorny/test-reporter@df6247429542221bc30d46a036ee47af1102c451 # v2.7.0
with:
name: Test Results
path: test_results/test-output.xml
reporter: java-junit
report-title: Test Results
- name: Create Code Coverage Summary Report
if: steps.unit-tests.conclusion != 'skipped'
uses: irongut/CodeCoverageSummary@51cc3a756ddcd398d447c044c02cb6aa83fdae95 #v1.3.0
with:
filename: "test_results/coverage/cobertura-coverage.xml"
badge: true
format: "markdown"
output: "both"
- name: Upload Code Coverage Report
if: steps.unit-tests.conclusion != 'skipped'
run: |
echo "# Code Coverage" >> $GITHUB_STEP_SUMMARY
if [ -f code-coverage-results.md ]; then
cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY
else
echo "Coverage report not found" >> $GITHUB_STEP_SUMMARY
fi
- name: Upload build artifacts
id: artifact
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: devtoolbox-artifacts
path: dist/dev-tool-box/browser/
retention-days: 5
if-no-files-found: error
e2e:
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.event_name == 'pull_request'
strategy:
matrix:
browser: [chrome, firefox, edge]
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
- name: Download build artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: devtoolbox-artifacts
path: dist/dev-tool-box/browser/
- name: Run E2E tests
uses: cypress-io/github-action@4c06c48f3ffea349b7189aa06dfcda47a9fa7b92 # v7.1.8
with:
start: npm run start
wait-on: http://localhost:4200
browser: ${{ matrix.browser }}
record: false
spec: cypress/e2e/**/*.cy.ts
- name: Upload Cypress screenshots
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: failure()
with:
name: cypress-screenshots-${{ matrix.browser }}
path: cypress/screenshots/
retention-days: 7
if-no-files-found: ignore
- name: Upload Cypress videos
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: always()
with:
name: cypress-videos-${{ matrix.browser }}
path: cypress/videos/
retention-days: 7
if-no-files-found: ignore