Skip to content

Commit 1c06b62

Browse files
split up github actions
1 parent d9893ac commit 1c06b62

File tree

6 files changed

+67
-32
lines changed

6 files changed

+67
-32
lines changed

.github/workflows/build-example-app.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ name: Build Example App
22

33
on:
44
pull_request:
5-
push:
6-
branches:
7-
- master
85

96
jobs:
107
Build:

.github/workflows/build-sdk.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ name: Build SDK
22

33
on:
44
pull_request:
5-
push:
6-
branches:
7-
- master
85

96
jobs:
107
Build:
@@ -23,8 +20,4 @@ jobs:
2320
${{ runner.os }}-node-
2421
2522
- run: npm install
26-
- run: npm run prettier -- --check
27-
- run: npm run lint
2823
- run: npm run build
29-
- run: npm run test
30-
- run: npm run spellcheck

.github/workflows/lint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Lint
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
Build:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v2
13+
with:
14+
node-version: 16
15+
- uses: actions/cache@v3
16+
with:
17+
path: node_modules
18+
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
19+
restore-keys: |
20+
${{ runner.os }}-node-
21+
22+
- run: npm install
23+
- run: npm run prettier -- --check
24+
- run: npm run lint
25+
- run: npm run spellcheck

.github/workflows/package-audit-example-app.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@ name: Package Audit Example App
33
on:
44
pull_request:
55
paths:
6-
- example/**
7-
- .github/workflows/package-audit-app.yml
6+
- example/**
7+
- .github/workflows/package-audit-app.yml
88
schedule:
9-
- cron: "0 0 1 * *" # every month
9+
- cron: "0 0 1 * *" # every month
1010

1111
jobs:
1212
Build:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v2
17-
- uses: actions/setup-node@v2
18-
with:
19-
node-version: 16
20-
cache: npm
16+
- uses: actions/checkout@v2
17+
- uses: actions/setup-node@v2
18+
with:
19+
node-version: 16
20+
cache: npm
2121

22-
- name: Run npm audit (app)
23-
run: npm audit --omit dev
24-
working-directory: example
22+
- name: Run npm audit (app)
23+
run: npm audit
24+
working-directory: example

.github/workflows/package-audit-sdk.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,19 @@ name: Package Audit SDK
22

33
on:
44
pull_request:
5-
push:
6-
branches:
7-
- master
85
schedule:
9-
- cron: "0 0 1 * *" # every month
6+
- cron: "0 0 1 * *" # every month
107

118
jobs:
129
Build:
1310
runs-on: ubuntu-latest
1411

1512
steps:
16-
- uses: actions/checkout@v2
17-
- uses: actions/setup-node@v2
18-
with:
19-
node-version: 16
20-
cache: npm
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-node@v2
15+
with:
16+
node-version: 16
17+
cache: npm
2118

22-
- name: Run npm audit
23-
run: npm audit --omit dev
19+
- name: Run npm audit
20+
run: npm audit

.github/workflows/unit-test.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Unit/Integration tests
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
Build:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v2
13+
with:
14+
node-version: 16
15+
- uses: actions/cache@v3
16+
with:
17+
path: node_modules
18+
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
19+
restore-keys: |
20+
${{ runner.os }}-node-
21+
22+
- run: npm install
23+
- run: npm run test

0 commit comments

Comments
 (0)