Repository navigation
156 lines (125 loc) · 4.43 KB
/
Copy pathci.yml
File metadata and controls
156 lines (125 loc) · 4.43 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- name: Enable Git long paths (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: git config --global core.longpaths true
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- name: Update submodules
run: git submodule update --init --recursive
- name: Install Rust
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
- name: Cache Rust
uses: Swatinem/rust-cache@fb003b4f771bbf9c2de31d5f65c40689cc097fb5 # v2.1.0
- name: Check
run: cargo check --all-features
- name: Test
run: cargo test --all-features
- name: Format
if: ${{ matrix.os == 'ubuntu-latest' }}
run: cargo fmt --all -- --check
- name: Conformance
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
cargo run -p oxc_angular_conformance
git diff --exit-code
napi-smoke:
name: NAPI Smoke (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- name: Enable Git long paths (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: git config --global core.longpaths true
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- name: Update submodules
run: git submodule update --init --recursive
- name: Install Rust
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
- name: Cache Rust
uses: Swatinem/rust-cache@fb003b4f771bbf9c2de31d5f65c40689cc097fb5 # v2.1.0
- name: Install pnpm
uses: pnpm/action-setup@08c4be7e2e672a47d11bd04269e27e5f3e8529cb # v6.0.0
- name: Install Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Build
run: |
pnpm build-dev
pnpm --filter ./napi/angular-compiler build:ts
- name: Test
run: pnpm test
napi:
name: NAPI Build (Ubuntu E2E)
runs-on: ubuntu-latest
needs: napi-smoke
permissions:
contents: read
# Uploads to the remote task cache authenticate with a GitHub Actions OIDC token.
# Fork pull requests never receive one.
id-token: write
env:
VP_REMOTE_CACHE_URL: https://voidzero-remote-cache.voidzero-docs.workers.dev/projects/oxc-angular-compiler
# Only pushes to main upload. Pull requests only read, which needs no credentials.
VP_REMOTE_CACHE: ${{ github.event_name == 'push' && 'read-write' || 'read' }}
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- name: Update submodules
run: git submodule update --init --recursive
- name: Install Rust
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
- name: Cache Rust
uses: Swatinem/rust-cache@fb003b4f771bbf9c2de31d5f65c40689cc097fb5 # v2.1.0
- name: Install pnpm
uses: pnpm/action-setup@08c4be7e2e672a47d11bd04269e27e5f3e8529cb # v6.0.0
- name: Install Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Build
run: |
pnpm build-dev
pnpm --filter ./napi/angular-compiler build:ts
- name: Lint
run: pnpm check
- name: Test
run: |
pnpm --filter ./napi/angular-compiler exec playwright install --with-deps
pnpm test:e2e
# `vp run compare` runs the harness's `compare --fixtures` in two tasks: the ngtsc baseline,
# which is cached, then the comparison with Oxc (see vite.config.ts).
- name: Compare tests
run: pnpm exec vp run compare