Skip to content

Commit 4e152bb

Browse files
authored
Merge pull request #1 from byu-oit/ci
added ci workflow
2 parents 2de7a57 + e8227e7 commit 4e152bb

File tree

2 files changed

+81
-0
lines changed

2 files changed

+81
-0
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

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-create-ecr-repo-if-missing/workflows/CI/badge.svg)
2+
![Test](https://github.com/byu-oit/github-action-create-ecr-repo-if-missing/workflows/Test/badge.svg)
3+
14
# ![BYU logo](https://www.hscripts.com/freeimages/logos/university-logos/byu/byu-logo-clipart-128.gif) github-action-create-ecr-repo-if-missing
25
A GitHub Action for creating AWS ECR repositories
36

0 commit comments

Comments
 (0)