Skip to content

Commit

Permalink
chore(all): switch to new workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
fkleuver committed Feb 3, 2019
1 parent 10af8d3 commit aa25d1c
Show file tree
Hide file tree
Showing 16 changed files with 49 additions and 34,916 deletions.
105 changes: 40 additions & 65 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,70 +1,45 @@
# Defaults for all jobs
version: 2.1

defaults: &defaults
working_directory: ~/repo
docker:
- image: aureliaeffect/circleci-v1:latest
map-1: &filter_only_develop
filters:
branches:
only: develop

# Variables
var_1: &cache_key aurelia-{{ .Branch }}-{{ checksum "package.json" }}{{ checksum "package-lock.json" }}
map-2: &filter_only_tag
filters:
branches:
ignore: /.*/
tags:
only: /^v?[0-9]+(\.[0-9]+)*$/

version: 2
jobs:
install:
<<: *defaults
steps:
- checkout
- run: npm ci
- run: jspm install
- run: git checkout -- package.json
- save_cache:
key: *cache_key
paths:
- node_modules
- jspm_packages

build:
<<: *defaults
steps:
- checkout
- restore_cache:
key: *cache_key
- run: gulp build
- store_artifacts:
path: ./dist

unit_tests:
<<: *defaults
steps:
- checkout
- restore_cache:
key: *cache_key
- run: gulp cover
- run: codecov -f ./build/reports/coverage/coverage-final.json
- store_test_results:
path: ./build/reports/coverage
- store_artifacts:
path: ./build/reports/coverage

lint:
<<: *defaults
steps:
- checkout
- restore_cache:
key: *cache_key
- run: gulp lint
orbs:
v1: aurelia/v1@volatile

workflows:
version: 2
default_workflow:
jobs:
- install
- build:
requires:
- install
- unit_tests:
requires:
- install
- lint:
requires:
- install
main:
jobs:
- v1/build_test
- v1/build_merge:
<<: *filter_only_develop
requires:
- v1/build_test
- v1/npm_publish:
<<: *filter_only_tag
name: npm_publish_dry
args: "--dry-run"
- request_publish_latest:
<<: *filter_only_tag
type: approval
requires:
- npm_publish_dry
- v1/npm_publish:
<<: *filter_only_tag
name: npm_publish
context: Aurelia
requires:
- request_publish_latest
- v1/merge_back:
<<: *filter_only_tag
requires:
- npm_publish

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ bower_components
.idea
.DS_STORE
build/reports
dist
Loading

0 comments on commit aa25d1c

Please sign in to comment.