v4.1.0 Parse JSON-LD #385
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .github/workflows/build.yml | |
name: Build and Test | |
on: ["push", "pull_request"] | |
jobs: | |
test-node: | |
name: Test on Node.js ${{ matrix.node-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x, 22.x] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' # Add caching for npm dependencies | |
- name: Install dependencies | |
run: npm install | |
- name: Run build | |
run: npm run build | |
- name: Run tests | |
run: npm run test | |
- name: Generate and upload coverage report | |
if: matrix.node-version == '22.x' # Only run coverage on the latest LTS version | |
run: npm run coverage | |
- name: Upload coverage to Coveralls | |
if: matrix.node-version == '22.x' | |
uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload coverage to Codecov | |
if: matrix.node-version == '22.x' | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Upload test results to Codecov | |
if: matrix.node-version == '22.x' && ${{ !cancelled() }} | |
uses: codecov/test-results-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
# --- Test on the Bun runtime --- | |
test-bun: | |
name: Test on Bun | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest # Or a specific version | |
# Caching is enabled by default with setup-bun | |
- name: Install dependencies | |
run: bun install | |
- name: Run tests with Bun | |
run: bun run test |