feat: add workshop metadata #49
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: code checks | |
on: | |
pull_request: | |
branches: ["*"] | |
push: | |
branches: ["main"] | |
jobs: | |
lint: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: install node js | |
uses: actions/setup-node@v4 | |
with: | |
version: 20 | |
- name: setup pnpm | |
id: pnpm-install | |
uses: pnpm/action-setup@v3.0.0 | |
with: | |
version: 8 | |
run_install: false | |
- name: get pnpm store directory | |
id: pnpm-cache | |
run: | | |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v4 | |
name: Setup pnpm cache | |
with: | |
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: install dependencies | |
run: pnpm install | |
- run: cp .env.example .env | |
- run: pnpm lint | |
format: | |
name: format | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: install node js | |
uses: actions/setup-node@v4 | |
with: | |
version: 20 | |
- name: setup pnpm | |
id: pnpm-install | |
uses: pnpm/action-setup@v3.0.0 | |
with: | |
version: 8 | |
run-install: false | |
- name: get pnpm store directory | |
id: pnpm-cache | |
run: | | |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v4 | |
name: Setup pnpm cache | |
with: | |
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: install dependencies | |
run: pnpm install | |
- run: cp .env.example .env | |
- run: pnpm format:check | |
typecheck: | |
name: typecheck | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: install node | |
uses: actions/setup-node@v4 | |
with: | |
version: 20 | |
- name: setup pnpm | |
id: pnpm-install | |
uses: pnpm/action-setup@v3.0.0 | |
with: | |
version: 8 | |
run_install: false | |
- name: get pnpm store directory | |
id: pnpm-cache | |
run: | | |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v4 | |
name: Setup pnpm cache | |
with: | |
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: install dependencies | |
run: pnpm install | |
- run: cp .env.example .env | |
- run: pnpm typecheck |