-
Notifications
You must be signed in to change notification settings - Fork 84
128 lines (100 loc) · 3.6 KB
/
Copy pathci.yml
File metadata and controls
128 lines (100 loc) · 3.6 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
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: CI
on:
push:
branches:
- main
pull_request:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
code-quality:
runs-on: ubuntu-latest
name: Code quality
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
submodules: true
- name: Setup pnpm
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
with:
run_install: false
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24
cache: "pnpm"
cache-dependency-path: "pnpm-lock.yaml"
- name: Install the packages
run: pnpm install --frozen-lockfile
- name: Build the code
run: pnpm build:ci
- name: Type check (for tests)
run: pnpm type-check
- name: Check formatting
run: pnpm format:check
e2e:
runs-on: ubuntu-latest
name: E2E tests
timeout-minutes: 15
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
submodules: true
- name: Setup pnpm
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
with:
run_install: false
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24
cache: "pnpm"
cache-dependency-path: "pnpm-lock.yaml"
- name: Install the packages
run: pnpm install --frozen-lockfile
- name: Install Playwright browsers
working-directory: packages/vscode-extension
run: |
node -e "const path = require('node:path'); const testWeb = path.dirname(require.resolve('@vscode/test-web/package.json')); const browser = path.dirname(require.resolve('@playwright/browser-chromium/package.json', { paths: [testWeb] })); require(path.join(browser, 'install.js'));"
- name: Build the code
run: pnpm build
- name: Run the E2E tests
run: pnpm test:e2e
tests:
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
node-version: [22, 24]
name: Tests / OS ${{ matrix.os }} / NodeJS ${{ matrix.node-version }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
submodules: true
- name: Setup pnpm
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
with:
run_install: false
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
cache-dependency-path: "pnpm-lock.yaml"
- name: Install the packages
run: pnpm install --frozen-lockfile
- name: Build the code
run: pnpm build:ts
- name: Run the unit tests
run: pnpm test
- name: Run the prettier2 unit tests
run: pnpm --dir packages/prettier-plugin-liquid test
- name: Run the prettier2 idempotence tests
run: pnpm --dir packages/prettier-plugin-liquid test:idempotence
- name: Run the prettier3 unit tests
run: pnpm --dir packages/prettier-plugin-liquid test:3
- name: Run the prettier3 idempotence tests
run: pnpm --dir packages/prettier-plugin-liquid test:idempotence:3