refactor(benchmark): replace horrible hacks in reference parser bench… #22
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: ci | |
on: | |
push: | |
branches: [next] | |
pull_request: | |
branches: [next] | |
env: | |
yarn-cache-name: yarn-cache | |
yarn-cache-path: .yarn | |
jobs: | |
check-lockfile: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run actions/setup-node@v3 (${{ matrix.node-version}}) | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ env.yarn-cache-path }} | |
key: ${{ matrix.node-version }}-${{ env.yarn-cache-name }}-${{ hashFiles('**/yarn.lock') }} | |
- name: yarn | |
run: yarn --cache-folder=${{ env.yarn-cache-path }} | |
- name: Check yarn.lock for changes | |
run: git diff --quiet -- yarn.lock | |
format-check: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run actions/setup-node@v3 (${{ matrix.node-version}}) | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ env.yarn-cache-path }} | |
key: ${{ matrix.node-version }}-${{ env.yarn-cache-name }}-${{ hashFiles('**/yarn.lock') }} | |
- name: yarn | |
run: yarn --cache-folder=${{ env.yarn-cache-path }} --frozen-lockfile | |
- name: yarn format:check | |
run: yarn --cache-folder=${{ env.yarn-cache-path }} format:check | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run actions/setup-node@v3 (${{ matrix.node-version}}) | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ env.yarn-cache-path }} | |
key: ${{ matrix.node-version }}-${{ env.yarn-cache-name }}-${{ hashFiles('**/yarn.lock') }} | |
- name: yarn | |
run: yarn --cache-folder=${{ env.yarn-cache-path }} --frozen-lockfile | |
- name: yarn lint | |
run: yarn --cache-folder=${{ env.yarn-cache-path }} lint | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run actions/setup-node@v3 (${{ matrix.node-version}}) | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ env.yarn-cache-path }} | |
key: ${{ matrix.node-version }}-${{ env.yarn-cache-name }}-${{ hashFiles('**/yarn.lock') }} | |
- name: yarn | |
run: yarn --cache-folder=${{ env.yarn-cache-path }} --frozen-lockfile | |
- name: yarn build | |
run: yarn --cache-folder=${{ env.yarn-cache-path }} build | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run actions/setup-node@v3 (${{ matrix.node-version}}) | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ env.yarn-cache-path }} | |
key: ${{ matrix.node-version }}-${{ env.yarn-cache-name }}-${{ hashFiles('**/yarn.lock') }} | |
- name: yarn | |
run: yarn --cache-folder=${{ env.yarn-cache-path }} --frozen-lockfile | |
- name: yarn build | |
run: yarn --cache-folder=${{ env.yarn-cache-path }} build # Prime cache. | |
- name: yarn test | |
run: yarn --cache-folder=${{ env.yarn-cache-path }} test |