-
-
Notifications
You must be signed in to change notification settings - Fork 173
64 lines (54 loc) · 1.33 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
name: Node.js CI
on:
push:
branches:
- master
- next
pull_request:
branches:
- master
- next
jobs:
test:
name: Node.js v${{ matrix.nodejs }}
runs-on: ubuntu-latest
strategy:
matrix:
nodejs: [10, 12, 14, 16, 18]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.nodejs }}
- uses: oven-sh/setup-bun@v2
with:
bun-version: 0.8.1
- name: (env) cache
uses: actions/cache@v3
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-${{ matrix.nodejs }}-${{ hashFiles('**/package.json') }}
restore-keys: ${{ runner.os }}-${{ matrix.nodejs }}-
- name: Install
run: bun install
- name: Install Globals
if: matrix.nodejs >= 18
run: |
bun add -g c8
bun add -g oxlint
- name: Linter
if: matrix.nodejs >= 18
run: oxlint .
- name: Test
if: matrix.nodejs < 18
run: npm test
- name: Test w/ Coverage
if: matrix.nodejs >= 18
run: c8 --include=packages npm test
- name: Report
if: matrix.nodejs >= 18
run: |
c8 report --reporter=text-lcov > coverage.lcov
bash <(curl -s https://codecov.io/bash)
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}