Skip to content

Commit

Permalink
chore: Checks workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lanesawyer committed Jun 3, 2024
1 parent e10b436 commit f457a45
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 3 deletions.
95 changes: 95 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Checks

on: [pull_request]

concurrency:
# Cancels workflows that are already running when a new one is triggered for a branch
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm build

format:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Format
run: echo "Add pnpm fmt command here"

lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Lint
run: echo "Add pnpm lint command here"

test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Test
run: pnpm test

typecheck:
needs: build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Typecheck
run: pnpm typecheck
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"scripts": {
"preinstall": "npx only-allow pnpm",
"build": "pnpm -r run build",
"watch": "pnpm -r run watch"
"watch": "pnpm -r run watch",
"test": "pnpm -r run test:ci",
"typecheck": "pnpm -r run typecheck"
},
"devDependencies": {
"@parcel/packager-ts": "2.12.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/geometry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"typecheck": "tsc --noEmit",
"build": "parcel build --no-cache",
"watch": "parcel watch",
"test": "vitest --watch"
"test": "vitest --watch",
"test:ci": "vitest run"
},
"repository": {
"type": "git",
Expand Down
3 changes: 2 additions & 1 deletion packages/scatterbrain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"typecheck": "tsc --noEmit",
"build": "parcel build --no-cache",
"watch": "parcel watch",
"test": "vitest --watch"
"test": "vitest --watch",
"test:ci": "vitest run"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit f457a45

Please sign in to comment.