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

Commit 9fc33b5

Browse files
authored
Merge pull request #4 from byu-oit/ci
added ci workflow
2 parents 0fc78ec + cdb044b commit 9fc33b5

File tree

3 files changed

+82
-1
lines changed

3 files changed

+82
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: CI
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- master
7+
- 'v*'
8+
env:
9+
node_version: "12.x"
10+
11+
jobs:
12+
build: # make sure build/ci work properly
13+
name: Build
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v1
17+
- name: Set up Node.js
18+
uses: actions/setup-node@v1
19+
with:
20+
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
30+
31+
audit:
32+
name: Audit
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v2
36+
37+
- name: Set up Node.js
38+
uses: actions/setup-node@v1
39+
with:
40+
node-version: ${{ env.node_version }}
41+
42+
- name: npm audit
43+
run: npm audit --audit-level=critical
44+
45+
lint:
46+
name: Lint
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/checkout@v2
50+
51+
- name: Set up Node.js
52+
uses: actions/setup-node@v1
53+
with:
54+
node-version: ${{ env.node_version }}
55+
56+
- name: npm install
57+
run: npm install
58+
59+
- name: npm lint
60+
run: npm run lint
61+
62+
# When tests are added to the code uncomment
63+
# test-code:
64+
# name: Test
65+
# runs-on: ubuntu-latest
66+
# steps:
67+
# - uses: actions/checkout@v2
68+
#
69+
# - name: Set up Node.js
70+
# uses: actions/setup-node@v1
71+
# with:
72+
# node-version: ${{ env.node_version }}
73+
#
74+
# - name: npm install
75+
# run: npm install
76+
#
77+
# - name: npm test
78+
# run: npm test

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Test"
1+
name: Test
22
on:
33
push:
44
branches:

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
![CI](https://github.com/byu-oit/github-action-slack/workflows/CI/badge.svg)
2+
![Test](https://github.com/byu-oit/github-action-slack/workflows/Test/badge.svg)
3+
14
# ![BYU logo](https://www.hscripts.com/freeimages/logos/university-logos/byu/byu-logo-clipart-128.gif) github-action-slack
25
A GitHub Action for sending Slack notifications
36

0 commit comments

Comments
 (0)