diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 5c81e16f..d016c5d2 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -1,17 +1,16 @@ # This is a basic workflow to help you get started with Actions -name: validation +name: Validation -# Controls when the action will run. on: - push: - branches: [main] pull_request: branches: [main] - + types: [opened, synchronize, reopened] + push: + branches: [main] concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + group: validation-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -48,9 +47,17 @@ jobs: node-version: 22 cache: npm cache-dependency-path: '**/package-lock.json' + - name: Cache Angular + uses: actions/cache@v5 + with: + path: demo/angular/.angular/cache + key: ${{ runner.os }}-angular-${{ hashFiles('demo/angular/package-lock.json') }}-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-angular-${{ hashFiles('demo/angular/package-lock.json') }}- + ${{ runner.os }}-angular- - run: npm install - run: npm run build - - run: npm install && npm run test:ci + - run: npm ci && npm run test:ci working-directory: demo/angular