Skip to content

Commit

Permalink
ci: linting, tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zeyu2001 committed Jul 12, 2024
1 parent 857e48b commit 882be32
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Linting

on:
push:
branches-ignore:
- develop

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Setup Node LTS ✨
uses: actions/setup-node@v3
with:
cache: pnpm
node-version: lts/*

- name: Installing dependencies 📦️
run: pnpm install

- name: Lint 🛀
run: pnpm -r run lint
55 changes: 55 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Tests

on:
pull_request:
branches: [develop]
push:
branches: [develop]

jobs:
tests:
runs-on: ubuntu-latest
name: Run tests
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- uses: actions/setup-node@v3
with:
cache: pnpm
node-version-file: ".nvmrc"

- name: Install dependencies
run: pnpm install

- name: Run tests
run: |
pnpm -r run test
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- uses: actions/setup-node@v3
with:
cache: pnpm
node-version-file: ".nvmrc"

- name: Install
run: pnpm install

- name: Compile
run: |
pnpm -r run build
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.10.0

0 comments on commit 882be32

Please sign in to comment.