Skip to content

Commit

Permalink
feat: Add CI configuration for linting and testing with pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
Simoon-F committed Jan 13, 2025
1 parent 8469870 commit f3ac8c0
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 1 deletion.
78 changes: 78 additions & 0 deletions .github/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: CI

on:
push:
branches:
- main

pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Set node
uses: actions/setup-node@v4
with:
node-version: lts/*

- name: Cache pnpm modules
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: pnpm-store-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
pnpm-store-${{ runner.os }}-
- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build

- name: Lint
run: pnpm lint

- name: Typecheck
run: pnpm typecheck

test:
runs-on: ${{ matrix.os }}

strategy:
matrix:
node: [lts/*]
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false

steps:
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Set node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: Cache pnpm modules
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: pnpm-store-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
pnpm-store-${{ runner.os }}-
- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"lint:fix": "eslint --fix .",
"dev": "npx @eslint/config-inspector --config eslint.config.ts",
"eslint:typegen": "tsx eslint-typegen/eslint-typegen.ts",
"release": "bumpp && pnpm publish"
"release": "bumpp && pnpm publish",
"typecheck": "tsc --noEmit"
},
"keywords": [
"eslint",
Expand Down

0 comments on commit f3ac8c0

Please sign in to comment.