actions #255
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Angular Tests | |
on: | |
push: | |
branches: | |
- '*' # Trigger on all branches | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 8 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 # This step checks out your repository's code | |
- name: Fetch develop branch | |
run: git fetch origin develop | |
- name: Check for changes in ./src | |
id: check_changes | |
run: | | |
git diff --quiet origin/develop -- ./src || echo "::set-output name=changes_detected::true" | |
- name: Skip if no changes in ./src | |
run: exit 1 | |
if: steps.check_changes.outputs.changes_detected != 'true' | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20.x' # Updated Node.js version | |
- name: Install Angular CLI | |
run: yarn global add @angular/cli # Use Yarn to install Angular CLI | |
- name: Cache Yarn dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/yarn | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Clear Yarn Cache | |
run: yarn cache clean | |
- name: Install dependencies | |
run: yarn install # Use Yarn to install dependencies | |
- name: Run tests | |
run: yarn test-headless # Use Yarn to run tests |