add tests - test passing options to api #1
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: Test, build, and size limit | |
on: [pull_request] | |
jobs: | |
build: | |
name: Build, lint, and test on Node | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Install deps and build (with cache) | |
uses: bahmutov/npm-install@v1 | |
- name: Lint | |
run: npm run lint | |
- name: Test | |
run: npm test | |
- name: Build | |
run: npm run build | |
size: | |
runs-on: ubuntu-latest | |
env: | |
CI_JOB_NUMBER: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: andresz1/size-limit-action@v1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |