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

Bump dependencies, clean up workflows #15

Merged
merged 6 commits into from
Aug 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 26 additions & 36 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,76 +3,66 @@ on:
pull_request:
push:
branches:
- master
- staging
- 'v*'
env:
node_version: "12.x"

jobs:
build: # make sure build/ci work properly
name: Build
package:
name: Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: ${{ env.node_version }}

- name: npm install
run: npm install

- name: npm build
run: npm build

- name: npm run pack
run: npm run package
cache: npm
cache-dependency-path: '**/package-lock.json'
- run: npm ci --prefer-offline
- run: npm run package
# Complain if contents of /dist directory aren't as expected
- run: git diff --exit-code --compact-summary dist || { echo "::error::/dist directory does not match source code - please run 'npm run package'" && exit 1; }

audit:
name: Audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: ${{ env.node_version }}

- name: npm audit
run: npm audit --audit-level=critical
cache: npm
cache-dependency-path: '**/package-lock.json'
- run: npm audit --audit-level=critical

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: ${{ env.node_version }}

- name: npm install
run: npm install

- name: npm lint
run: npm run lint
cache: npm
cache-dependency-path: '**/package-lock.json'
- run: npm ci --prefer-offline
- run: npm run lint

# When tests are added to the code uncomment
# test-code:
# test:
# name: Test
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
#
# - name: Set up Node.js
# uses: actions/setup-node@v1
# uses: actions/setup-node@v2
# with:
# node-version: ${{ env.node_version }}
#
# - name: npm install
# run: npm install
#
# - name: npm test
# run: npm test
# cache: npm
# cache-dependency-path: '**/package-lock.json'
# - run: npm ci --prefer-offline
# - run: npm test
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ name: Test
on:
push:
branches:
- master
- staging
pull_request:
branches:
- master
- staging

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Slack
uses: ./
with:
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

Loading