Skip to content

Commit

Permalink
chore: add .circleci/config.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
bartkownacki authored and bartkownacki committed Aug 24, 2023
1 parent 6471794 commit c583fb1
Showing 1 changed file with 89 additions and 0 deletions.
89 changes: 89 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
version: 2.1

orbs:
node: circleci/[email protected]
sonarcloud: sonarsource/[email protected]

executors:
node-browsers:
docker:
- image: cimg/node:18.17-browsers

jobs:
lint:
resource_class: medium
docker:
- image: cimg/node:18.17
steps:
- checkout
- run: node --version
- node/install-packages:
cache-path: ~/project/node_modules
override-ci-command: yarn
cache-version: v3
include-branch-in-cache-key: false
- run:
name: Lint
command: yarn lint
test:
resource_class: medium
parallelism: 3
docker:
- image: cimg/node:18.17
steps:
- checkout
- attach_workspace:
at: ./coverage
- run: node --version
- node/install-packages:
cache-path: ~/project/node_modules
override-ci-command: yarn
cache-version: v2
include-branch-in-cache-key: false
- run:
name: Test
command: yarn test
no_output_timeout: 30m
- store_test_results:
path: ./test-results/
- store_artifacts:
path: ./test-results/
- persist_to_workspace:
root: ./coverage
paths:
- ./**/*
build:
resource_class: medium+
docker:
- image: cimg/node:18.17
steps:
- checkout
- run: node --version
- node/install-packages:
cache-path: ~/project/node_modules
override-ci-command: yarn
cache-version: v2
include-branch-in-cache-key: false
- run:
name: Build
command: yarn build
scan-and-upload-coverage:
docker:
- image: cimg/node:18.17
steps:
- checkout
- attach_workspace:
at: ./coverage
- sonarcloud/scan

workflows:
test:
jobs:
- lint
- test
- build
- scan-and-upload-coverage:
context:
- sonarcloud
requires:
- test

0 comments on commit c583fb1

Please sign in to comment.