Skip to content

v1.0.0-next.26

v1.0.0-next.26 #186

Workflow file for this run

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@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.nodejs }}
- uses: oven-sh/setup-bun@v1
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 }}