Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit473cd1a

Browse files
committed
Revert "Split coverage and deploy jobs in static.yml to avoid env issue"
This reverts commit0f14077.
1 parentf8c1853 commit473cd1a

File tree

1 file changed

+11
-23
lines changed

1 file changed

+11
-23
lines changed

‎.github/workflows/static.yml‎

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,39 +16,27 @@ concurrency:
1616
cancel-in-progress:true
1717

1818
jobs:
19-
coverage:
20-
runs-on:ubuntu-latest
21-
steps:
22-
-uses:actions/checkout@v4
23-
-uses:actions/setup-go@v5
24-
with:
25-
go-version-file:./go.mod
26-
-run:|
27-
./ci/test.sh
28-
echo "PERCENT=$(go tool cover -func ./ci/out/coverage.prof | tail -n1 | awk '{print $3}' | tr -d '%')" >> "$GITHUB_OUTPUT"
29-
{
30-
echo "HTML<<EOF"
31-
cat ./ci/out/coverage.html
32-
echo EOF
33-
} >> "$GITHUB_OUTPUT"
34-
3519
deploy:
3620
environment:
3721
name:github-pages
3822
url:${{ steps.deployment.outputs.page_url }}
3923
runs-on:ubuntu-latest
40-
needs:coverage
4124
steps:
25+
-name:Checkout
26+
uses:actions/checkout@v4
4227
-name:Setup Pages
4328
uses:actions/configure-pages@v5
44-
-name:Write coverage.html and coverage.svg
45-
env:
46-
PERCENT:${{ steps.coverage.outputs.PERCENT }}
47-
HTML:${{ steps.coverage.outputs.HTML }}
29+
-name:Setup Go
30+
uses:actions/setup-go@v5
31+
with:
32+
go-version-file:./go.mod
33+
-name:Generate coverage and badge
4834
run:|
35+
./ci/test.sh
4936
mkdir -p ./ci/out/static
50-
wget -O ./ci/out/static/coverage.svg "https://img.shields.io/badge/coverage-${PERCENT}%25-success"
51-
echo "$HTML" > ./ci/out/static/coverage.html
37+
cp ./ci/out/coverage.html ./ci/out/static/coverage.html
38+
percent=$(go tool cover -func ./ci/out/coverage.prof | tail -n1 | awk '{print $3}' | tr -d '%')
39+
wget -O ./ci/out/static/coverage.svg "https://img.shields.io/badge/coverage-${percent}%25-success"
5240
-name:Upload artifact
5341
uses:actions/upload-pages-artifact@v3
5442
with:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp