Skip to content

Commit

Permalink
ci: fix ci setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Theo Ephraim committed Jun 26, 2023
1 parent 89b5881 commit 652dfc5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 716 deletions.
44 changes: 22 additions & 22 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,37 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
version: 2.1

jobs:
build:
docker:
- image: circleci/node:11.15

working_directory: ~/repo
- image: node:18

steps:
- checkout

# Download and cache dependencies
- restore_cache:
name: Restore pnpm Package Cache
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run: npm install

- pnpm-packages-{{ checksum "pnpm-lock.yaml" }}
- run:
name: Install pnpm package manager
command: |
curl -L https://pnpm.js.org/pnpm.js | node - add --global pnpm@7
- run:
name: Install Dependencies
command: |
pnpm install
- save_cache:
name: Save pnpm Package Cache
key: pnpm-packages-{{ checksum "pnpm-lock.yaml" }}
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}

- node_module

- run: # RUN LINTER
name: ESLint
command: npx eslint ./ --format junit -o reports/junit/js-lint-results.xml
command: pnpm run lint --format junit -o reports/junit/js-lint-results.xml
- run: # RUN TESTS
name: Tests
command: npx jest --ci --runInBand --reporters=default --reporters=jest-junit --coverage
command: pnpm run test --ci --runInBand --reporters=default --reporters=jest-junit --coverage
environment:
JEST_JUNIT_OUTPUT: "reports/junit/js-test-results.xml"

Expand All @@ -42,4 +41,5 @@ jobs:
path: reports/junit
- store_artifacts: # for display in Artifacts: https://circleci.com/docs/2.0/artifacts/
path: coverage
prefix: coverage
prefix: coverage

Loading

0 comments on commit 652dfc5

Please sign in to comment.