Skip to content

Commit 1504c1e

Browse files
committed
ci: update workflow
1 parent c2a4aaf commit 1504c1e

File tree

1 file changed

+44
-8
lines changed

1 file changed

+44
-8
lines changed

.github/workflows/test.yml

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,60 @@
11
name: 'build-test'
2-
on: # rebuild any PRs and main branch changes
2+
on:
33
pull_request:
4+
paths-ignore:
5+
- '*.md'
46
push:
57
branches:
68
- main
79
- 'releases/*'
10+
paths-ignore:
11+
- '*.md'
812

913
jobs:
10-
build: # make sure build/ci work properly
14+
build:
1115
runs-on: ubuntu-latest
1216
steps:
1317
- uses: actions/checkout@v2
14-
- run: |
15-
npm install
16-
- run: |
17-
npm run all
18-
test: # make sure the action works on a clean machine without building
18+
19+
- name: Dump GitHub context
20+
env:
21+
GITHUB_CONTEXT: ${{ toJson(github) }}
22+
run: echo "${GITHUB_CONTEXT}"
23+
24+
- name: Setup Node
25+
uses: actions/setup-node@v2-beta
26+
with:
27+
node-version: '12'
28+
29+
- name: Dump version
30+
run: |
31+
node -v
32+
npm --version
33+
34+
- name: Cache node modules
35+
uses: actions/cache@v2
36+
with:
37+
path: ~/.npm
38+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
39+
restore-keys: |
40+
${{ runner.os }}-node-
41+
42+
- name: Install Dependencies
43+
run: npm ci
44+
45+
- name: Test build
46+
env:
47+
TOKEN: ${{ secrets.TOKEN }}
48+
run: npm run all
49+
50+
test:
1951
runs-on: ubuntu-latest
2052
steps:
2153
- uses: actions/checkout@v2
2254
- uses: ./
55+
env:
56+
TOKEN: ${{ secrets.TOKEN }}
2357
with:
24-
milliseconds: 1000
58+
gist_id: e885afa349a0e5d1cfb408e46d6a37bc
59+
gist_file_name: foo.bar
60+
file_path: ./__tests__/foo.bar

0 commit comments

Comments
 (0)