-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (31 loc) · 1.06 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
name: CI
on: [push]
jobs:
build:
env:
CC_TEST_REPORTER_ID: 5e336cf788ad4ee3b5af94f7b5b5156e82d15068a2bd58b0978b16cc1ff8555d
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ['20.x', '22.x']
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- run: npm i
- if: matrix.os == 'ubuntu-latest'
run: curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- if: matrix.os == 'ubuntu-latest'
run: chmod +x ./cc-test-reporter
- if: matrix.os == 'ubuntu-latest'
run: ./cc-test-reporter before-build
- run: npm run cover
- if: matrix.os == 'ubuntu-latest'
run: ./cc-test-reporter after-build
- name: Build
run: npm run build