-
Notifications
You must be signed in to change notification settings - Fork 24
56 lines (46 loc) · 1.25 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
name: CI (build, test, format)
# All pull requests, and
# Workflow dispatch allows you to run this workflow manually from the Actions tab
on:
pull_request:
workflow_dispatch:
push:
branches:
- main
jobs:
build:
name: ${{ matrix.os }} - Node.js v${{ matrix.NodeVersion }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
NodeVersion: [16, 18]
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Fetch base branch
if: github.ref_name != 'main'
run: git fetch origin ${{ github.base_ref }}
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.NodeVersion }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build packages
run: pnpm build
- name: Lint packages
run: pnpm lint:ci
- name: Test packages
run: pnpm test
- name: Verify source code formatting
if: github.ref_name != 'main'
run: pnpm run format:ci