forked from wellcometrust/next-plugin-transpile-modules
-
-
Notifications
You must be signed in to change notification settings - Fork 84
74 lines (56 loc) · 2 KB
/
ci.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: tests
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- master
pull_request:
branches:
- '*'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
node: [16, 18]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn
- name: Information
run: npm version
- name: Install Puppeteer dependencies
run: bash .github/workflows/setup_puppeteer.sh
if: startsWith(matrix.os,'ubuntu')
- name: Tests setup
run: node src/__tests__/setup.js
- name: 'Test: linting'
run: yarn run test:lint
- name: 'Test: formatting'
run: yarn run test:formatting
env:
CI: true
- name: 'Test: typings'
run: yarn run typings
- name: Install tests apps dependencies (npm-basic)
run: npm ci --prefix=src/__tests__/__apps__/npm-basic
- name: Install tests apps dependencies (yarn workspaces)
run: yarn --frozen-lockfile --cwd src/__tests__/__apps__/yarn-workspaces
- name: Install tests apps dependencies (yarn workspaces symlinks)
run: yarn --frozen-lockfile --cwd src/__tests__/__apps__/yarn-workspaces-symlinks
- name: Install tests apps dependencies (pnpn workspaces)
run: npx pnpm i --frozen-lockfile --prefix src/__tests__/__apps__/pnpm
- name: Install tests apps dependencies (swc)
run: yarn --frozen-lockfile --cwd src/__tests__/__apps__/swc
- name: Install tests apps dependencies (with-app-dir)
run: yarn --frozen-lockfile --cwd src/__tests__/__apps__/with-app-dir
- name: Build test apps
run: yarn run test:prepare
- name: 'Test: unit & integration tests'
run: npm test