|
1 |
| -name: Setup go |
| 1 | +name: CI |
2 | 2 |
|
3 |
| -on: |
4 |
| - workflow_dispatch: |
| 3 | +on: [push] |
5 | 4 |
|
6 |
| - |
7 | 5 | jobs:
|
8 |
| - build: |
| 6 | + code-quality: |
9 | 7 | runs-on: ubuntu-latest
|
| 8 | + name: Code quality |
| 9 | + steps: |
| 10 | + - uses: actions/checkout@v4 |
| 11 | + with: |
| 12 | + submodules: true |
| 13 | + |
| 14 | + - name: Setup Node.js |
| 15 | + uses: actions/setup-node@v4 |
| 16 | + with: |
| 17 | + node-version: ${{ matrix.node-version }} |
| 18 | + cache: "yarn" |
| 19 | + cache-dependency-path: "yarn.lock" |
| 20 | + |
| 21 | + - name: Install the packages |
| 22 | + run: yarn install --frozen-lockfile --ignore-engines |
| 23 | + |
| 24 | + - name: Build the code |
| 25 | + run: yarn build:ci |
| 26 | + |
| 27 | + - name: Type check (for tests) |
| 28 | + run: yarn type-check |
| 29 | + |
| 30 | + - name: Check formatting |
| 31 | + run: yarn format:check |
| 32 | + |
| 33 | + tests: |
| 34 | + runs-on: ${{ matrix.os }} |
| 35 | + timeout-minutes: 30 |
| 36 | + strategy: |
| 37 | + matrix: |
| 38 | + os: [windows-latest, ubuntu-latest] |
| 39 | + node-version: [18, 20] |
| 40 | + |
| 41 | + name: Tests / OS ${{ matrix.os }} / NodeJS ${{ matrix.node-version }} |
10 | 42 |
|
11 | 43 | steps:
|
12 | 44 | - uses: actions/checkout@v4
|
13 |
| - - uses: actions/setup-go@v5 |
14 | 45 | with:
|
15 |
| - go-version-file: 'path/to/go.mod' |
16 |
| - - run: go version |
| 46 | + submodules: true |
| 47 | + |
| 48 | + - name: Setup Node.js |
| 49 | + uses: actions/setup-node@v4 |
| 50 | + with: |
| 51 | + node-version: ${{ matrix.node-version }} |
| 52 | + cache: "yarn" |
| 53 | + cache-dependency-path: "yarn.lock" |
| 54 | + |
| 55 | + - name: Install the packages |
| 56 | + run: yarn install --frozen-lockfile --ignore-engines |
| 57 | + |
| 58 | + - name: Build the code |
| 59 | + run: yarn build:ts |
| 60 | + |
| 61 | + - name: Run the unit tests |
| 62 | + run: yarn test |
| 63 | + |
| 64 | + - name: Run the prettier2 unit tests |
| 65 | + run: yarn --cwd packages/prettier-plugin-liquid test |
| 66 | + |
| 67 | + - name: Run the prettier2 idempotence tests |
| 68 | + run: yarn --cwd packages/prettier-plugin-liquid test:idempotence |
| 69 | + |
| 70 | + - name: Run the prettier3 unit tests |
| 71 | + run: yarn --cwd packages/prettier-plugin-liquid test:3 |
| 72 | + |
| 73 | + - name: Run the prettier3 idempotence tests |
| 74 | + run: yarn --cwd packages/prettier-plugin-liquid test:idempotence:3 |
| 75 | + |
0 commit comments