Skip to content

Commit

Permalink
feat: added gitlab ci (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
stickyPiston authored Jul 4, 2024
1 parent 8a3cb04 commit 06128db
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
stages:
- quality
- build
- test

cache:
key:
files:
- pnpm-lock.yaml
paths:
- .pnpm-store
policy: pull-push

.setup_pnpm:
before_script:
- corepack enable
- corepack prepare pnpm@latest-9 --activate
- pnpm config set store-dir .pnpm-store
- pnpm install --frozen-lockfile
- cp sample.env .env || true

eslint:
stage: quality
image: node:21
extends:
- .setup_pnpm
script:
- pnpm lint
cache:
policy: pull

prettier:
stage: quality
image: node:21
extends:
- .setup_pnpm
script:
- npx prettier --check .
cache:
policy: pull

build:
stage: build
image: node:21
extends:
- .setup_pnpm
script:
- pnpm build

vitest:
stage: test
image: node:21
extends:
- .setup_pnpm
script:
- pnpm test
dependencies:
- build

workflow:
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_PIPELINE_SOURCE == "merge_request_event"

0 comments on commit 06128db

Please sign in to comment.