Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use vitest v8 coverage provider and enable coverage #417

Merged
merged 3 commits into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 25 additions & 11 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,44 @@ on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Linting
run: npm run format:ci
build:
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
node-version: [14.18.0, '*']
exclude:
os: [ubuntu-latest]
node-version: ['14.18.0', '*']
# Must include the minimum deno version from the `DENO_VERSION_RANGE` constant in `node/bridge.ts`.
deno-version: ['v1.32.0', 'v1.x']
include:
- os: macOS-latest
node-version: 14.18.0
node-version: '*'
deno-version: 'v1.x'
- os: windows-latest
node-version: 14.18.0
node-version: '*'
deno-version: 'v1.x'
fail-fast: false
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
# Should match the `DENO_VERSION_RANGE` constant in `node/bridge.ts`.
deno-version: v1.30.0
deno-version: ${{ matrix.deno-version }}
- name: Setup Deno dependencies
run: deno cache https://deno.land/x/[email protected]/eszip.ts
- name: Node.js ${{ matrix.node-version }}
Expand All @@ -38,16 +55,13 @@ jobs:
check-latest: true
- name: Install dependencies
run: npm ci
- name: Linting
run: npm run format:ci
if: "${{ matrix.node-version == '*' }}"
- name: Tests
run: npm run test:ci
- name: Get test coverage flags
id: test-coverage-flags
run: |-
os=${{ matrix.os }}
node=${{ matrix.node-version }}
node=$(node --version)
echo "os=${os/-latest/}" >> $GITHUB_OUTPUT
echo "node=node_${node//[.*]/}" >> $GITHUB_OUTPUT
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion node/bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { getBinaryExtension } from './platform.js'
const DENO_VERSION_FILE = 'version.txt'
// When updating DENO_VERSION_RANGE, ensure that the deno version installed in the
// build-image/buildbot does satisfy this range!
const DENO_VERSION_RANGE = '^1.30.0'
const DENO_VERSION_RANGE = '^1.32.0'

type OnBeforeDownloadHook = () => void | Promise<void>
type OnAfterDownloadHook = (error?: Error) => void | Promise<void>
Expand Down
Loading