Skip to content

Potential fix for code scanning alert no. 1: Workflow does not contain permissions #1363

Potential fix for code scanning alert no. 1: Workflow does not contain permissions

Potential fix for code scanning alert no. 1: Workflow does not contain permissions #1363

Workflow file for this run

name: CI
permissions:
contents: read
on: pull_request
jobs:
test-latest:
strategy:
matrix:
# os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, windows-latest]
name: Test with Angular@latest on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- uses: actions/checkout@v5
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: '24'
- name: Install dependencies
run: npm ci
env:
CI: true
- name: Build the lib
run: npm run build
- name: Run unit tests
run: npm run unit:${{ matrix.os }}
- name: Run unit tests in private mode
run: npm run unit:${{ matrix.os }}:private
- name: Run e2e tests
run: npm run e2e
if: matrix.os == 'ubuntu-latest'
test-minimum:
name: Test with Angular@21.0.0 and minimum dependencies requirements
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v5
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: '20.19'
- name: Install dependencies
run: npm ci
env:
CI: true
- name: Build the lib (with the current version, as it is what is published on npm)
run: npm run build
- name: Downgrade dependencies to minimal required version
run: npm install typescript@5.9.2 tslib@2.5.0 better-typescript-lib@2.12.0 rxjs@7.6.0 @angular/common@21.0.0 @angular/compiler@21.0.0 @angular/core@21.0.0 @angular/platform-browser@21.0.0 @angular/router@21.0.0 @angular/cli@21.0.0 @angular/compiler-cli@21.0.0 @angular/build@21.0.0 --legacy-peer-deps
env:
CI: true
- name: Run unit tests
run: npm run unit:ubuntu-latest
- name: Run unit tests in private mode
run: npm run unit:ubuntu-latest:private
- name: Run e2e tests
run: npm run e2e