-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (48 loc) · 1.85 KB
/
development.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
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Development
on:
pull_request:
types:
- opened
- edited
- synchronize
- reopened
push:
workflow_call:
jobs:
build:
name: Node.js ${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [ 16.x, 18.x, 20.x ]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: "☁️ Checkout repository"
uses: actions/checkout@v3
- name: "📦 Install pnpm"
uses: pnpm/action-setup@v2
with:
version: latest
run_install: |
- recursive: true
args: [--frozen-lockfile]
- name: "🔧 Use Node.js ${{ matrix.node-version }}"
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: "🧪 Run test"
run: pnpm test
- name: "☂️ Collect Coverage"
run: pnpm coverage
if: ${{ matrix.node-version == '16.x' }}
- name: "☂️ Coverage to Codecov"
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
if: ${{ matrix.node-version == '16.x' }}