Repository navigation
82 lines (77 loc) · 2.39 KB
/
Copy pathcheck-pr.yaml
File metadata and controls
82 lines (77 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: PR Checks
on:
pull_request:
branches:
- main
push:
branches:
- main
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lockfile-release-age:
name: Candidate lockfile release age (non-authoritative)
runs-on: ubuntu-latest
steps:
- name: Checkout code and base history
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: 24
- name: Non-authoritative candidate attestation of pull request lockfile artifacts
if: github.event_name == 'pull_request'
run: npm run check-lockfile-release-age -- --base "${{ github.event.pull_request.base.sha }}"
- name: Non-authoritative candidate attestation of policy-new pushed artifacts
if: github.event_name == 'push'
run: npm run check-lockfile-release-age
validation:
name: Validation (${{ matrix.os }})
needs: lockfile-release-age
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Setup Node.js
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: 24
cache: npm
- name: Install dependencies
run: npm ci
- name: Check dependency vulnerabilities
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run check-dependency-audit
- name: Run lint
if: runner.os == 'Linux'
run: npm run lint
- name: Run prettier
if: runner.os == 'Linux'
run: npm run prettier-check
- name: Run type-check
run: npm run type-check
- name: Run Node.js tests
run: npm run test:node
- name: Run Edge tests
run: npm run test:edge
- name: Build package
run: npm run build
- name: Check build outputs
run: npm run check-build
- name: Build V2 package
run: npm run build:v2
- name: Check V2 build outputs
run: npm run check-build:v2