diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml new file mode 100644 index 0000000000..15a57ee5b5 --- /dev/null +++ b/.github/workflows/pr-validation.yml @@ -0,0 +1,55 @@ +name: pr-validation + +on: + pull_request: + branches: + - release/live + types: [opened, synchronize, reopened] + +permissions: + contents: read + +concurrency: + group: pr-validation-${{ github.ref }} + cancel-in-progress: true + +jobs: + lint: + name: lint + runs-on: ubuntu-24.04 + timeout-minutes: 20 + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 20.20.2 + + - name: Install dependencies + run: npm ci --ignore-scripts + + - name: Lint + run: npm run lint + + test: + name: test + runs-on: ubuntu-24.04 + timeout-minutes: 45 + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 20.20.2 + + - name: Install dependencies + run: npm ci --ignore-scripts + + - name: Prepare local test inputs + run: | + set -euo pipefail + test -f projects/v3/src/environments/environment.ts || cp projects/v3/src/environments/environment.local.ts projects/v3/src/environments/environment.ts + npm run prebuildv3 + + - name: Unit tests + run: npm test