good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
websocket
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
github
nhooyr
websocket
Commits
0f14077d
Commit
0f14077d
authored
7 months ago
by
Mathias Fredriksson
Browse files
Options
Downloads
Patches
Plain Diff
Split coverage and deploy jobs in static.yml to avoid env issue
parent
f2b9c3f4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.github/workflows/static.yml
+23
-11
23 additions, 11 deletions
.github/workflows/static.yml
with
23 additions
and
11 deletions
.github/workflows/static.yml
+
23
−
11
View file @
0f14077d
...
...
@@ -16,27 +16,39 @@ concurrency:
cancel-in-progress
:
true
jobs
:
coverage
:
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v4
-
uses
:
actions/setup-go@v5
with
:
go-version-file
:
./go.mod
-
run
:
|
./ci/test.sh
echo "PERCENT=$(go tool cover -func ./ci/out/coverage.prof | tail -n1 | awk '{print $3}' | tr -d '%')" >> "$GITHUB_OUTPUT"
{
echo "HTML<<EOF"
cat ./ci/out/coverage.html
echo EOF
} >> "$GITHUB_OUTPUT"
deploy
:
environment
:
name
:
github-pages
url
:
${{ steps.deployment.outputs.page_url }}
runs-on
:
ubuntu-latest
needs
:
coverage
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v4
-
name
:
Setup Pages
uses
:
actions/configure-pages@v5
-
name
:
Setup Go
uses
:
actions/setup-go@v5
with
:
go-version-file
:
./go.mod
-
name
:
Generate coverage and badge
-
name
:
Write coverage.html and coverage.svg
env
:
PERCENT
:
${{ steps.coverage.outputs.PERCENT }}
HTML
:
${{ steps.coverage.outputs.HTML }}
run
:
|
./ci/test.sh
mkdir -p ./ci/out/static
cp ./ci/out/coverage.html ./ci/out/static/coverage.html
percent=$(go tool cover -func ./ci/out/coverage.prof | tail -n1 | awk '{print $3}' | tr -d '%')
wget -O ./ci/out/static/coverage.svg "https://img.shields.io/badge/coverage-${percent}%25-success"
wget -O ./ci/out/static/coverage.svg "https://img.shields.io/badge/coverage-${PERCENT}%25-success"
echo "$HTML" > ./ci/out/static/coverage.html
-
name
:
Upload artifact
uses
:
actions/upload-pages-artifact@v3
with
:
...
...
This diff is collapsed.
Click to expand it.
a
@elee
mentioned in commit
473cd1a2
·
7 months ago
mentioned in commit
473cd1a2
mentioned in commit 473cd1a22a3f4540176be9cbe8ac3706dc20fdad
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment