Skip to content

Commit

Permalink
infra: unit test via github action
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 committed Feb 28, 2024
1 parent a3f47bd commit 6a7ac6b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 12 deletions.
12 changes: 0 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,6 @@ jobs:
paths:
- ./node_modules
- <<: *save
lint:
docker:
- <<: *node-image
steps:
- <<: *restore
- run: npm run lint
test:
docker:
- <<: *node-image
steps:
- <<: *restore
- run: npm test
test-pg-9:
docker:
- <<: *node-image
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,41 @@ permissions:
contents: read # to fetch code (actions/checkout)

jobs:
unit-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node_version: [18, 20]
fail-fast: false
timeout-minutes: 10

name: 'Build & Unit Test: node-${{ matrix.node_version }}, ${{ matrix.os }}'
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
# Required for docs/versions tests
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0

- name: Set node version to ${{ matrix.node_version }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ matrix.node_version }}
cache: 'pnpm'

- name: Install deps
run: pnpm install

- name: Build
run: pnpm run build

- name: Test
run: pnpm run test

lint:
runs-on: ubuntu-latest
timeout-minutes: 10
Expand Down

0 comments on commit 6a7ac6b

Please sign in to comment.