Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

Commit 1bb9a6a

Browse files
authored
Merge pull request #15 from byu-oit/deps
Bump dependencies, clean up workflows
2 parents 6da1796 + d1070e6 commit 1bb9a6a

File tree

5 files changed

+756
-815
lines changed

5 files changed

+756
-815
lines changed

.github/workflows/ci.yaml

Lines changed: 26 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,76 +3,66 @@ on:
33
pull_request:
44
push:
55
branches:
6-
- master
6+
- staging
77
- 'v*'
88
env:
99
node_version: "12.x"
1010

1111
jobs:
12-
build: # make sure build/ci work properly
13-
name: Build
12+
package:
13+
name: Package
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v1
16+
- uses: actions/checkout@v2
1717
- name: Set up Node.js
18-
uses: actions/setup-node@v1
18+
uses: actions/setup-node@v2
1919
with:
2020
node-version: ${{ env.node_version }}
21-
22-
- name: npm install
23-
run: npm install
24-
25-
- name: npm build
26-
run: npm build
27-
28-
- name: npm run pack
29-
run: npm run package
21+
cache: npm
22+
cache-dependency-path: '**/package-lock.json'
23+
- run: npm ci --prefer-offline
24+
- run: npm run package
25+
# Complain if contents of /dist directory aren't as expected
26+
- run: git diff --exit-code --compact-summary dist || { echo "::error::/dist directory does not match source code - please run 'npm run package'" && exit 1; }
3027

3128
audit:
3229
name: Audit
3330
runs-on: ubuntu-latest
3431
steps:
3532
- uses: actions/checkout@v2
36-
3733
- name: Set up Node.js
38-
uses: actions/setup-node@v1
34+
uses: actions/setup-node@v2
3935
with:
4036
node-version: ${{ env.node_version }}
41-
42-
- name: npm audit
43-
run: npm audit --audit-level=critical
37+
cache: npm
38+
cache-dependency-path: '**/package-lock.json'
39+
- run: npm audit --audit-level=critical
4440

4541
lint:
4642
name: Lint
4743
runs-on: ubuntu-latest
4844
steps:
4945
- uses: actions/checkout@v2
50-
5146
- name: Set up Node.js
52-
uses: actions/setup-node@v1
47+
uses: actions/setup-node@v2
5348
with:
5449
node-version: ${{ env.node_version }}
55-
56-
- name: npm install
57-
run: npm install
58-
59-
- name: npm lint
60-
run: npm run lint
50+
cache: npm
51+
cache-dependency-path: '**/package-lock.json'
52+
- run: npm ci --prefer-offline
53+
- run: npm run lint
6154

6255
# When tests are added to the code uncomment
63-
# test-code:
56+
# test:
6457
# name: Test
6558
# runs-on: ubuntu-latest
6659
# steps:
6760
# - uses: actions/checkout@v2
68-
#
6961
# - name: Set up Node.js
70-
# uses: actions/setup-node@v1
62+
# uses: actions/setup-node@v2
7163
# with:
7264
# node-version: ${{ env.node_version }}
73-
#
74-
# - name: npm install
75-
# run: npm install
76-
#
77-
# - name: npm test
78-
# run: npm test
65+
# cache: npm
66+
# cache-dependency-path: '**/package-lock.json'
67+
# - run: npm ci --prefer-offline
68+
# - run: npm test

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ name: Test
22
on:
33
push:
44
branches:
5-
- master
5+
- staging
66
pull_request:
77
branches:
8-
- master
8+
- staging
99

1010
jobs:
1111
test:
1212
name: Test
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v1
15+
- uses: actions/checkout@v2
1616
- name: Slack
1717
uses: ./
1818
with:

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)