refactor: build with rollup + esbuild and migrate to vitest #2072
This file contains 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
name: Push CI | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: "https://registry.npmjs.org" | |
- name: Enable Corepack | |
run: corepack enable | |
- name: Install Dependencies | |
run: yarn install --immutable | |
- name: Checks | |
run: yarn run checks | |
- name: Build | |
run: yarn run build | |
if: startsWith(matrix.node-version, '20.') | |
- name: Prettier | |
run: yarn run lint:prettier | |
if: startsWith(matrix.node-version, '20.') | |
- name: Typescript | |
run: yarn run tsc | |
if: startsWith(matrix.node-version, '20.') | |
- name: Eslint | |
run: yarn run lint:eslint | |
if: startsWith(matrix.node-version, '20.') | |
- name: Generate Test Coverage | |
run: yarn run test:coverage:json | |
if: startsWith(matrix.node-version, '20.') | |
env: | |
CI: true | |
NODE_V8_COVERAGE: coverage/ | |
- name: Send results to codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
if: startsWith(matrix.node-version, '20.') | |
- name: Check nothing was forgotten before commit | |
if: startsWith(matrix.node-version, '20.') | |
run: yarn run repository-check-dirty |