Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

Commit

Permalink
maybe circleci migration?
Browse files Browse the repository at this point in the history
  • Loading branch information
JaneJeon committed Dec 25, 2021
1 parent b418036 commit bee8f5f
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
version: 2.1

aliases:
- &size
resource_class: small
- &params
parameters:
node-version:
type: string

orbs:
node: circleci/node@4
slack: circleci/slack@4
codecov: codecov/codecov@3

jobs:
lint:
<<: *size
<<: *params
executor:
name: node/default
tag: << parameters.node-version >>
steps:
- checkout
- node/install-packages
- run: npm run lint:prettier
- run: npm run lint:eslint -- --format junit --output-file reports/eslint/results.xml
test:
<<: *size
<<: *params
docker:
- image: cimg/node:<< parameters.node-version >>
- image: cimg/postgres:14.1
environment:
POSTGRES_USER: knex
POSTGRES_DB: objection-authorize
steps:
- checkout
- node/install-packages
- run: npm test -- --ci --coverage # reports automatically generated

workflows:
build:
jobs:
- lint:
node-version: lts
post-steps:
- &retrieve-junit
store_test_results:
path: reports
- test:
context: shared-vars
requires:
- lint
matrix:
parameters:
node-version:
- lts
- current
post-steps:
- *retrieve-junit
- codecov/upload # don't need token for public repos
- slack/notify:
event: fail
template: basic_fail_1
2 changes: 2 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
process.env.JEST_JUNIT_OUTPUT_DIR = 'reports/jest'

module.exports = {
coverageThreshold: {
global: {
Expand Down

0 comments on commit bee8f5f

Please sign in to comment.