-
Notifications
You must be signed in to change notification settings - Fork 51
94 lines (87 loc) · 2.43 KB
/
continuous-integration.yml
File metadata and controls
94 lines (87 loc) · 2.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
name: CI tests
on:
push:
branches:
- main
paths-ignore:
- 'LICENSE'
- '**.md'
- '.vscode/**'
- '.github/ISSUE_TEMPLATE/**'
- '.github/CODEOWNERS'
- 'flake.nix'
- 'flake.lock'
- 'renovate.json'
pull_request:
paths-ignore:
- 'LICENSE'
- '**.md'
- '.vscode/**'
- '.github/ISSUE_TEMPLATE/**'
- '.github/CODEOWNERS'
- 'flake.nix'
- 'flake.lock'
- 'renovate.json'
env:
PRISMA_TELEMETRY_INFORMATION: 'language-tools continuous-integration.yml'
jobs:
test:
name: Tests + Shellcheck
runs-on: ${{ matrix.os }}
timeout-minutes: 25
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
- name: Install Dependencies
run: pnpm install
- name: Build all packages
run: pnpm build
- name: Typecheck all packages
run: pnpm typecheck
- name: Lint all packages
run: pnpm lint
- name: Run unit tests in all packages
run: pnpm test
- name: Run VS Code extension E2E tests in headless mode
uses: coactions/setup-xvfb@v1
with:
run: pnpm test:e2e
# Playwright testing
- name: Install Playwright browsers
run: |
cd packages/vscode
npx playwright install chromium
- name: Run Playwright UI tests
uses: coactions/setup-xvfb@v1
with:
run: pnpm test:playwright
working-directory: packages/vscode
env:
CI: true
- name: Upload Playwright report
uses: actions/upload-artifact@v4
if: failure()
with:
name: playwright-report-${{ matrix.os }}
path: packages/vscode/playwright-report/
retention-days: 30
- name: Catch shell script issues
if: matrix.os == 'ubuntu-latest'
run: pnpm shell:lint
- name: Catch version incompatibilities
if: matrix.os == 'ubuntu-latest'
run: pnpm test:scripts
- uses: codecov/codecov-action@v4
with:
files: ./scripts/__tests__/coverage/clover.xml,./packages/language-server/coverage/clover.xml
flags: ${{ matrix.os }}
name: ${{ matrix.os }}