in-dev #4
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
# Yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
name: Checks | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
env: | |
NODE_VERSION: 20 | |
jobs: | |
lint-and-format: | |
name: Lint and format packages | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v4 | |
- name: Setup NodeJS environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build packages | |
run: pnpm build | |
- name: Lint packages | |
run: pnpm lint | |
- name: Format packages | |
run: pnpm format | |
typecheck: | |
name: Type-check packages | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v4 | |
- name: Setup NodeJS environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build packages | |
run: pnpm build | |
- name: Typecheck packages | |
run: pnpm typecheck | |
test: | |
name: Test packages | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v4 | |
- name: Setup NodeJS environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build packages | |
run: pnpm build | |
- name: Test packages | |
run: pnpm test |