Skip to content

Update CI trigger

Update CI trigger #286

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
jobs:
build:
name: Build
uses: ./.github/workflows/.build.yaml
check:
name: Check
uses: ./.github/workflows/.check.yaml
coverage:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- uses: actions/download-artifact@v4
- name: Coverage
run: pnpm test:coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
test_nodejs:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
node-version: [18.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- run: pnpm install --frozen-lockfile
- uses: actions/download-artifact@v4
- run: pnpm test run
test_deno:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v4
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- run: |
deno eval '
import { parse } from "./dist/es/web-csv-toolbox.js";
const csv = `name,age
Alice,42
Bob,69`;
for await (const record of parse(csv)) {
console.log(record);
}'
test_linux_browser:
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
browsers:
- chrome
- firefox
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20
cache: pnpm
- run: pnpm install --frozen-lockfile
- uses: actions/download-artifact@v4
- run: npm test run -- --browser.name=${{ matrix.browsers }} --browser.headless
test_macos_browser:
runs-on: macos-latest
needs: build
strategy:
fail-fast: false
matrix:
browsers:
- chrome
- firefox
# Headless Safari is currentry not supported
# https://github.com/vitest-dev/vitest/blob/main/packages/browser/src/node/providers/webdriver.ts#L39-L41
# - safari
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20
cache: pnpm
# - if: matrix.browsers == 'safari'
# run: sudo safaridriver --enable
- run: pnpm install --frozen-lockfile
- uses: actions/download-artifact@v4
- run: pnpm test run -- --browser.name=${{ matrix.browsers }} --browser.headless
test_windows_browser:
runs-on: windows-latest
needs: build
strategy:
fail-fast: false
matrix:
browsers:
- chrome
- firefox
- edge
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20
cache: pnpm
- run: pnpm install --frozen-lockfile
- uses: actions/download-artifact@v4
- run: pnpm test run -- --browser.name=${{ matrix.browsers }} --browser.headless