Skip to content

Commit d4140da

Browse files
committed
ci: separate build and test jobs
1 parent 3e42d16 commit d4140da

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/build.yml

+14-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ jobs:
2424
- name: Check formatting
2525
run: npm run format:check
2626
build-and-test:
27-
need: lint
2827
runs-on: ubuntu-latest
2928
timeout-minutes: 5
3029
steps:
@@ -38,10 +37,22 @@ jobs:
3837
run: npm ci --ignore-scripts
3938
- name: Build
4039
run: npm run build
40+
test:
41+
runs-on: ubuntu-latest
42+
timeout-minutes: 5
43+
steps:
44+
- name: Checkout
45+
uses: actions/[email protected]
46+
- name: Setup node
47+
uses: actions/[email protected]
48+
with:
49+
node-version: 12
50+
- name: Install project
51+
run: npm ci --ignore-scripts
4152
- name: Test
4253
run: npm run test:ci
4354
code-coverage:
44-
need: build
55+
needs: [lint, build, test]
4556
runs-on: ubuntu-latest
4657
timeout-minutes: 5
4758
steps:
@@ -61,7 +72,7 @@ jobs:
6172
token: ${{ secrets.CODECOV_TOKEN }}
6273
file: ./coverage/cobertura-coverage.xml
6374
release:
64-
needs: [build, code-coverage]
75+
needs: [lint, build, test, code-coverage]
6576
runs-on: ubuntu-latest
6677
# GitHub API requests can easy take a couple of seconds and the release can
6778
# make lots of API requests when a release has a lot of commits. If every

0 commit comments

Comments
 (0)