-
Notifications
You must be signed in to change notification settings - Fork 39
50 lines (45 loc) · 1.32 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
name: CI
on:
push:
branches:
- main
tags:
- v[0-9]+.[0-9]+.[0-9]+*
pull_request:
jobs:
build:
runs-on: macOS-latest
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: '3.11' # distutils is required by node-gyp and dropped by python core in 3.12
- name: Install
run: yarn --frozen-lockfile
- name: Build
run: yarn tsc
- name: Lint
run: yarn lint
- name: Test
run: yarn coverage
- name: Upload code coverage to Codecov
uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457 #v3.1.6
with:
file: ./coverage/lcov.info
env_vars: NODE_VERSION
env:
NODE_VERSION: ${{ matrix.node-version }}
automerge:
needs: build
runs-on: ubuntu-latest
steps:
- uses: fastify/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}