-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathconfig.yml
111 lines (105 loc) · 2.75 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
version: 2.1
orbs:
slack: circleci/[email protected]
executors:
node_executor:
docker:
- image: cimg/node:20.16
jobs:
build:
working_directory: ~/auditjs
executor: node_executor
steps:
- checkout
- restore_cache:
name: Restore Yarn Package Cache
keys:
- yarn-packages-{{ checksum "yarn.lock" }}
- run:
name: Install Dependencies
command: yarn install
- save_cache:
name: Save Yarn Package Cache
key: yarn-packages-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
- run:
name: Lint auditjs
command: yarn lint
- run:
name: build
command: yarn build
- run:
name: make test reports directory
command: mkdir reports
- run:
name: test
command: yarn test-ci
# - run:
# name: code coverage
# command: |
# yarn coverage
# yarn generate-coverage-report
- store_test_results:
path: reports
- store_artifacts:
path: ./reports/test-results.xml
- store_artifacts:
path: ./lcov.info
prefix: tests
- run:
name: dogfood scan
command: yarn run start ossi --whitelist dev-auditjs.json
# - slack/notify:
# event: fail
# template: basic_fail_1
# branch_pattern: main
release:
working_directory: ~/auditjs
executor: node_executor
steps:
- checkout
- run:
name: Allow global installs of npm packages
command: sudo chown -R circleci:circleci /usr/local/lib && sudo chown -R circleci:circleci /usr/local/bin
- run:
name: Install dependencies
command: yarn install
- run:
name: Build auditjs
command: yarn build
- run:
name: Install publishing packages
command: yarn global add semantic-release@latest @semantic-release/changelog @semantic-release/git@latest @semantic-release/npm@latest
- run:
name: Attempt publish
command: yarn exec semantic-release
- slack/notify:
event: fail
template: basic_fail_1
workflows:
version: 2.1
build_and_release:
jobs:
- build
# - build:
# context: slack_community_oss_fun
- release:
filters:
branches:
only: main
context:
- auditjs
- slack_community_oss_fun
requires:
- build
build_nightly:
triggers:
- schedule:
cron: "40 20 * * *"
filters:
branches:
only: main
jobs:
- build:
context: slack_community_oss_fun