-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (51 loc) · 1.52 KB
/
main.yml
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
on:
push:
branches:
- '**'
tags-ignore:
- 'v[0-9]+.[0-9]+.[0-9]+'
pull_request:
branches:
- master
name: build
jobs:
build:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
strategy:
matrix:
node: [16, 18]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: checkout
uses: actions/checkout@v3
- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v3
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ matrix.platform }}-node-${{ matrix.node }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ matrix.platform }}-node-${{ matrix.node }}
- name: install deps
run: npm ci
- name: run lint
run: npm run lint
- name: run tests
run: npm run test
if: matrix.platform != 'ubuntu-latest' # Do not run this on ubuntu, more at: https://github.com/facebook/jest/issues/11438
- name: build library for e2e tests
run: npm run build
- name: build integration tests
working-directory: ./e2e/server/testdata
run: npx tsc
- name: run e2e tests for plugin integration
run: npm run test:e2e
- name: remove symlinks breaking cache
run: npx rimraf ./e2e/server/testdata/node_modules