Skip to content

Commit c5d7066

Browse files
authored
split ci workflow jobs (#353)
* split ci workflow jobs * split one test job into two
1 parent 9e8713b commit c5d7066

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
name: ci
22
on: [push, pull_request]
33
jobs:
4-
tests:
4+
tests1:
55
runs-on: ubuntu-latest
66
steps:
77
- name: Checkout 🛎
88
uses: actions/checkout@v3
99

10+
- name: Node version 🖨️
11+
run: node -v
12+
1013
- name: NPM install
1114
uses: bahmutov/npm-install@v1
1215

@@ -34,6 +37,17 @@ jobs:
3437
- name: Run demo 7 📊
3538
run: npm run demo7
3639

40+
tests2:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Checkout 🛎
44+
uses: actions/checkout@v3
45+
46+
- name: Node version 🖨️
47+
run: node -v
48+
49+
- name: NPM install
50+
uses: bahmutov/npm-install@v1
3751
# hmm why are some demos skipped?
3852

3953
- name: Run demo 11 📊
@@ -57,8 +71,15 @@ jobs:
5771
- name: Run demo expect 403 code 📊
5872
run: npm run demo-expect-403
5973

74+
release:
75+
needs: ['tests1', 'tests2']
76+
if: github.ref == 'refs/heads/master'
77+
runs-on: ubuntu-latest
78+
steps:
79+
- name: Checkout 🛎
80+
uses: actions/checkout@v3
81+
6082
- name: Semantic Release 🚀
61-
if: github.ref == 'refs/heads/master'
6283
uses: cycjimmy/semantic-release-action@v3
6384
env:
6485
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)