Skip to content

Commit 9a3e687

Browse files
authored
CI fixes (#56)
* Only run coverage once, and only if on a PR. * Upload to the upload URL. * Fix if: syntax.
1 parent ef43977 commit 9a3e687

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

.github/typescript-ci-patch.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
# Only check coverage in one of the matrix job instances.
4545
- op: add
4646
path: /jobs/test/steps/7/if
47-
value: ${{ contains(matrix.os, 'ubuntu') && matrix.node_version == '10' && matrix.rust_version == 'stable' }}
47+
value: ${{ contains(matrix.os, 'ubuntu') && matrix.node_version == '10' && matrix.rust_version == 'stable' && github.base_ref != '' }}
4848

4949
# Also run on musl. That means we need to run it in a Docker container. To do that, we copy the entire job and modify its
5050
# strategy/matrix.
@@ -73,3 +73,6 @@
7373
# We don't need to run setup-node inside of a node docker image.
7474
- op: remove
7575
path: /jobs/test-docker/steps/4
76+
# No need to check test coverage here, since we do it in the first matrix build.
77+
- op: remove
78+
path: /jobs/test-docker/steps/8

.github/workflows/publish.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
env:
5757
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5858
with:
59-
upload_url: ${{ github.event.release.assets_url }}
59+
upload_url: ${{ github.event.release.upload_url }}
6060
asset_path: bin-package/${{ steps.build.outputs.asset }}
6161
asset_name: ${{ steps.build.outputs.asset }}
6262
asset_content_type: application/gzip
@@ -96,7 +96,7 @@ jobs:
9696
env:
9797
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9898
with:
99-
upload_url: ${{ github.event.release.assets_url }}
99+
upload_url: ${{ github.event.release.upload_url }}
100100
asset_path: bin-package/${{ steps.build.outputs.asset }}
101101
asset_name: ${{ steps.build.outputs.asset }}
102102
asset_content_type: application/gzip

.github/workflows/typescript-ci.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
run: yarn run test
4747
- name: Check test coverage
4848
if: ${{ contains(matrix.os, 'ubuntu') && matrix.node_version == '10' && matrix.rust_version
49-
== 'stable' }}
49+
== 'stable' && github.base_ref != '' }}
5050
uses: anuraag016/Jest-Coverage-Diff@V1.1
5151
with:
5252
fullCoverageDiff: false
@@ -82,12 +82,5 @@ jobs:
8282
run: yarn run compile
8383
- name: Run tests
8484
run: yarn run test
85-
- name: Check test coverage
86-
if: ${{ contains(matrix.os, 'ubuntu') && matrix.node_version == '10' && matrix.rust_version
87-
== 'stable' }}
88-
uses: anuraag016/Jest-Coverage-Diff@V1.1
89-
with:
90-
fullCoverageDiff: false
91-
delta: 0.2
9285
container:
9386
image: node:${{ matrix.node_version }}-alpine

0 commit comments

Comments
 (0)