chore: fix ci on main branch (#96) #350
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: | |
- main | |
pull_request: | |
branches: | |
- main | |
permissions: | |
pull-requests: write | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
name: Lint and Typecheck | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Lint files | |
run: yarn lint | |
- name: Typecheck files | |
run: yarn typecheck | |
test: | |
runs-on: ubuntu-latest | |
name: Test | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Run unit tests | |
run: yarn test --maxWorkers=2 --coverage | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
build-library: | |
runs-on: ubuntu-latest | |
name: Build Library | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Build package | |
run: yarn build | |
- name: Calculate Size | |
if: github.ref != 'refs/heads/main' | |
uses: andresz1/size-limit-action@v1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
test-website: | |
runs-on: ubuntu-latest | |
name: Test Website | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js and website deps | |
uses: ./.github/actions/setup-website | |
- name: Build website | |
run: cd ./website && yarn build |