From bb241fb556ee79df885037e34077d2a0bed61894 Mon Sep 17 00:00:00 2001 From: Matthew Gabeler-Lee Date: Mon, 31 Oct 2022 14:58:33 -0400 Subject: [PATCH] fix: modernize ci so it runs --- .circleci/config.yml | 101 +++++++++++++++++++++++++++++++++++++++++++ .node-version | 1 + circle.yml | 25 ----------- 3 files changed, 102 insertions(+), 25 deletions(-) create mode 100644 .circleci/config.yml create mode 100644 .node-version delete mode 100644 circle.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..adbeed1 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,101 @@ +version: 2.1 + +orbs: + sixrs-gke: sixriversystems/sixrs-gke@3 + +jobs: + setup: + docker: + - image: cimg/node:14.17.6 + steps: + - checkout + - run: + name: Install Dependencies + command: npm ci + - persist_to_workspace: + root: ./ + paths: + - . + # build: + # docker: + # - image: cimg/node:14.17.6 + # steps: + # - attach_workspace: + # at: ./ + # - run: + # name: Build + # command: npm run only:build + # - persist_to_workspace: + # root: ./ + # paths: + # - dist + # lint: + # docker: + # - image: cimg/node:14.17.6 + # steps: + # - attach_workspace: + # at: ./ + # - run: + # name: check format + # command: npm run format:check + # - run: + # name: Lint + # command: npm run eslint:check -- --format junit --output-file ./reports/eslint/results.xml + # - store_test_results: + # path: ./reports + # - store_artifacts: + # path: ./reports + test: + docker: + - image: cimg/node:14.17.6 + environment: + MOCHA_OPTS: --reporter mocha-junit-reporter --reporter-options mochaFile=./reports/junit/mocha/mocha.xml + steps: + - attach_workspace: + at: ./ + - run: + name: Unit Tests + command: npm run test + # - run: + # name: Coverage + # command: npm run only:lCov + # - sixrs-gke/codecov + - store_test_results: + path: ./reports + - store_artifacts: + path: ./reports + publish: + docker: + - image: cimg/node:14.17.6 + steps: + - attach_workspace: + at: ./ + - sixrs-gke/run-release + - sixrs-gke/npm-public-publish +workflows: + version: 2 + build-test-deploy: + jobs: + - setup + # - build: + # context: 6rs-public-npm + # requires: + # - setup + # - lint: + # context: 6rs-public-npm + # requires: + # - setup + - test: + context: 6rs-public-npm + requires: + - setup + - publish: + context: 6rs-public-npm + requires: + - setup + # - build + # - lint + - test + filters: + branches: + only: main diff --git a/.node-version b/.node-version new file mode 100644 index 0000000..5595ae1 --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +14.17.6 diff --git a/circle.yml b/circle.yml deleted file mode 100644 index 41d36ea..0000000 --- a/circle.yml +++ /dev/null @@ -1,25 +0,0 @@ -machine: - node: - version: 7.5.0 - services: - - docker - environment: - MOCHA_OPTS: --reporter mocha-junit-reporter --reporter-options mochaFile=$CIRCLE_TEST_REPORTS/mocha/junit.xml - ESLINT_OPTS: --quiet --format junit -o $CIRCLE_TEST_REPORTS/eslint.xml - -dependencies: - pre: - - 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc' - - npm i npm -g - -test: - pre: - - mkdir -p $CIRCLE_TEST_REPORTS/mocha - override: - - npm test - -deployment: - all: - branch: master - commands: - - ./scripts/release.sh