Skip to content
This repository has been archived by the owner on Feb 28, 2021. It is now read-only.

Commit

Permalink
Merge pull request #37 from auth0-extensions/ci-remove-fossa
Browse files Browse the repository at this point in the history
ci: Update package to package up an extension.
  • Loading branch information
faroceann authored Jul 9, 2020
2 parents 5007fb4 + 614c9dc commit 9de5f97
Showing 1 changed file with 55 additions and 32 deletions.
87 changes: 55 additions & 32 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,66 @@
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
version: 2.1
jobs:
build:
docker:
- image: circleci/node:8.12

build_and_test:
working_directory: ~/repo
parameters:
v:
type: string
default: "8"
docker:
- image: circleci/node:<< parameters.v >>

steps:
- checkout
- run: npm ci
- run: npm run test
- persist_to_workspace:
root: ~/repo
paths: .

# Download and cache dependencies
- restore_cache:
keys:
- npm-dependencies-{{ checksum "package-lock.json" }}
# fallback to using the latest cache if no exact match is found
- npm-dependencies-

- run:
name: Install FOSSA
command: |
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | bash
- run: npm install

- run:
name: FOSSA Init
command: fossa init
- run:
name: FOSSA Analyze
command: fossa analyze
deploy:
working_directory: ~/repo
docker:
- image: circleci/node:12
steps:
- attach_workspace:
at: ~/repo
- run: npm run build
- run:
name: FOSSA Test
command: fossa test
name: Compress Artifacts
command: tar -zcvf dist.tar.gz dist/
- store_artifacts:
path: dist.tar.gz

- save_cache:
name: Save npm packages to cache
key: npm-dependencies-{{ checksum "package-lock.json" }}
paths:
- ./node_modules
workflows:
version: 2.1
build_and_test:
jobs:
- build_and_test:
name: build_and_test_node8
v: "8"
- build_and_test:
name: build_and_test_node12
v: "12"
- build_and_test:
name: build_and_test_node13
v: "13"
build_test_and_deploy:
jobs:
- build_and_test:
v: "8" # Change this when we move to node 12.
filters:
tags:
only: /^v.*/
branches:
only: master
- deploy:
requires:
- build_and_test
filters:
branches:
ignore: /.*/
tags:
only: /^v.*/

0 comments on commit 9de5f97

Please sign in to comment.