Skip to content

Commit 41ae0cf

Browse files
authored
ci: update baseline coverage on build + new file URL (ietf-tools#4365)
1 parent 6d585d2 commit 41ae0cf

3 files changed

Lines changed: 25 additions & 7 deletions

File tree

.github/workflows/build.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ on:
77

88
workflow_dispatch:
99
inputs:
10+
summary:
11+
description: 'Release Summary'
12+
required: false
13+
type: string
14+
default: ''
1015
publish:
1116
description: 'Create Production Release'
1217
required: true
@@ -15,15 +20,15 @@ on:
1520
description: 'Skip Tests'
1621
required: true
1722
type: boolean
23+
updatecoverage:
24+
description: 'Update Baseline Coverage'
25+
default: true
26+
required: true
27+
type: boolean
1828
dryrun:
1929
description: 'Dry Run'
2030
required: true
2131
type: boolean
22-
summary:
23-
description: 'Summary'
24-
required: false
25-
type: string
26-
default: ''
2732

2833
jobs:
2934
# -----------------------------------------------------------------
@@ -307,6 +312,19 @@ jobs:
307312
body: ${{ steps.covprocess.outputs.changelog }}
308313
artifacts: "/home/runner/work/release/release.tar.gz,coverage.json,historical-coverage.json"
309314
token: ${{ secrets.GITHUB_TOKEN }}
315+
316+
- name: Update Baseline Coverage
317+
uses: ncipollo/release-action@v1
318+
if: ${{ github.event.inputs.updatecoverage == 'true' && github.event.inputs.dryrun == 'false' }}
319+
with:
320+
allowUpdates: true
321+
tag: baseline
322+
omitBodyDuringUpdate: true
323+
omitNameDuringUpdate: true
324+
omitPrereleaseDuringUpdate: true
325+
replacesArtifacts: true
326+
artifacts: "coverage.json"
327+
token: ${{ secrets.GITHUB_TOKEN }}
310328

311329
- name: Upload Build Artifacts
312330
uses: actions/upload-artifact@v2.3.1

dev/tests/prepare.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ echo "Creating data directories..."
1717
chmod +x ./docker/scripts/app-create-dirs.sh
1818
./docker/scripts/app-create-dirs.sh
1919
echo "Fetching latest coverage results file..."
20-
curl -fsSL https://github.com/ietf-tools/datatracker/releases/latest/download/coverage.json -o release-coverage.json
20+
curl -fsSL https://github.com/ietf-tools/datatracker/releases/download/baseline/coverage.json -o release-coverage.json

docker/scripts/app-init.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ chmod +x ./docker/scripts/app-create-dirs.sh
8282
# Download latest coverage results file
8383

8484
echo "Downloading latest coverage results file..."
85-
curl -fsSL https://github.com/ietf-tools/datatracker/releases/latest/download/coverage.json -o release-coverage.json
85+
curl -fsSL https://github.com/ietf-tools/datatracker/releases/download/baseline/coverage.json -o release-coverage.json
8686

8787
# Wait for DB container
8888

0 commit comments

Comments
 (0)