2020-09-05 12:43:05 +00:00
|
|
|
name: Tester
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
tester:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
2023-10-01 04:46:39 +00:00
|
|
|
node-version: ["18", "20"]
|
2020-09-05 12:43:05 +00:00
|
|
|
fail-fast: false
|
|
|
|
steps:
|
2023-10-01 04:48:01 +00:00
|
|
|
- uses: actions/checkout@v4
|
2020-09-05 12:43:05 +00:00
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
2022-10-09 07:58:57 +00:00
|
|
|
uses: actions/setup-node@v3
|
2020-09-05 12:43:05 +00:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
- name: Cache NPM dependencies
|
2022-10-09 07:58:57 +00:00
|
|
|
uses: actions/cache@v3
|
2020-09-05 12:43:05 +00:00
|
|
|
with:
|
|
|
|
path: node_modules
|
|
|
|
key: ${{ runner.os }}-npm-cache
|
|
|
|
restore-keys: ${{ runner.os }}-npm-cache
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: npm install
|
|
|
|
- name: Test
|
|
|
|
run: npm run test
|
|
|
|
env:
|
|
|
|
CI: true
|
|
|
|
coverage:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest]
|
2023-10-01 04:46:39 +00:00
|
|
|
node-version: ["18.x"]
|
2020-09-05 12:43:05 +00:00
|
|
|
steps:
|
2023-10-01 04:48:01 +00:00
|
|
|
- uses: actions/checkout@v4
|
2020-09-05 12:43:05 +00:00
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
2022-10-09 07:58:57 +00:00
|
|
|
uses: actions/setup-node@v3
|
2020-09-05 12:43:05 +00:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
2023-10-01 04:05:08 +00:00
|
|
|
- name: Install Bun
|
|
|
|
uses: oven-sh/setup-bun@v1
|
2020-09-05 12:43:05 +00:00
|
|
|
- name: Cache NPM dependencies
|
2022-10-09 07:58:57 +00:00
|
|
|
uses: actions/cache@v3
|
2020-09-05 12:43:05 +00:00
|
|
|
with:
|
|
|
|
path: node_modules
|
|
|
|
key: ${{ runner.os }}-npm-cache
|
|
|
|
restore-keys: ${{ runner.os }}-npm-cache
|
|
|
|
- name: Install Dependencies
|
2023-10-01 04:05:08 +00:00
|
|
|
run: bun install
|
2020-09-05 12:43:05 +00:00
|
|
|
- name: Coverage
|
|
|
|
run: npm run test
|
|
|
|
env:
|
|
|
|
CI: true
|
|
|
|
- name: Upload coverage report to Codecov
|
2022-10-09 07:58:57 +00:00
|
|
|
uses: codecov/codecov-action@v3
|
2020-09-05 12:43:05 +00:00
|
|
|
with:
|
|
|
|
fail_ci_if_error: true
|