-
Notifications
You must be signed in to change notification settings - Fork 81
150 lines (116 loc) · 3.9 KB
/
Copy pathci.yml
File metadata and controls
150 lines (116 loc) · 3.9 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
name: CI
on:
pull_request:
branches:
- main
- release/*
merge_group:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: "Build (${{ matrix.os }}, Node ${{ matrix.node-version }})"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
node-version: ["22.x", "24.x", "26.x"]
env:
TYPESPEC_VS_CI_BUILD: true
TYPESPEC_SKIP_WEBSITE_BUILD: true
steps:
- name: Enable long paths in git
if: runner.os == 'Windows'
run: git config --global core.longpaths true
- uses: actions/checkout@v7
with:
submodules: recursive
- uses: ./.github/actions/setup
with:
node-version: ${{ matrix.node-version }}
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm run build
- name: Test
run: pnpm vitest run --config ./vitest.config.fast.ts --coverage --reporter=github-actions --reporter=default
- name: Regen samples
run: pnpm run regen-samples
- name: Check Git Status For Changed Files
run: node eng/scripts/check-for-changed-files.js
website:
name: Website
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
submodules: recursive
- uses: ./.github/actions/setup
- name: Install dependencies
run: pnpm install
- name: Install browsers
run: pnpm exec playwright install
- name: Build website
run: pnpm --filter "@azure-tools/typespec-azure-website..." run build
- name: Check Git Status For Changed Files
run: node eng/scripts/check-for-changed-files.js
e2e:
name: E2E Tests
runs-on: ubuntu-latest
env:
TYPESPEC_VS_CI_BUILD: true
TYPESPEC_SKIP_WEBSITE_BUILD: true
steps:
- uses: actions/checkout@v7
with:
submodules: recursive
- uses: ./.github/actions/setup
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x
- name: Install dependencies
run: pnpm install
- name: Install playwright browsers
run: |
sudo dpkg --configure -a
npx playwright install --with-deps
working-directory: packages/typespec-azure-playground-website
- name: Build
run: pnpm run build
- name: Azure Http Specs e2e tests
run: node packages/e2e-tests/e2e-tests.mjs
- name: E2E Tests
# Skip on merge queue from publish branches and on publish/* PR source branches
if: ${{ !startsWith(github.ref, 'refs/heads/gh-readonly-queue/') && !startsWith(github.head_ref, 'publish/') }}
run: pnpm test:e2e
autorest-checks:
name: Autorest Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
submodules: recursive
- uses: ./.github/actions/setup
with:
node-version: "22.x"
- name: Install dependencies
run: pnpm install
- name: Build internal tools
run: pnpm --filter "@typespec/internal-build-utils..." run build
- name: Install autorest & script dependencies
run: npm install -g autorest && cd eng/scripts && npm install
- name: Swagger - Resource Manager Linting
run: node eng/scripts/lint-resourcemanager.js "packages/samples/test/output/azure/resource-manager"
- name: Swagger - Generate Python SDK
run: node eng/scripts/gen-sdk.js python "packages/samples/test/output/azure/resource-manager"
- name: Swagger - Generate JavaScript SDK
run: node eng/scripts/gen-sdk.js javascript "packages/samples/test/output/azure/resource-manager"