Skip to content

build(deps): bump actions/checkout from 6.0.3 to 7.0.0 #3873

build(deps): bump actions/checkout from 6.0.3 to 7.0.0

build(deps): bump actions/checkout from 6.0.3 to 7.0.0 #3873

Workflow file for this run

name: CI
on:
pull_request:
branches:
- v*
- develop/*
push:
branches:
- v*
- develop/*
jobs:
build:
runs-on: ubuntu-latest
name: "Test"
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Cache Go modules
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install Go stable version
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: "go.mod"
check-latest: true
- name: Install stringer
run: go install golang.org/x/tools/cmd/stringer@v0.42.0
- name: Install jose
run: sudo apt-get install -y --no-install-recommends jose
- run: make generate
- name: make tidy
run: make tidy
- name: Test with coverage
run: make cover
- name: Coverage report
if: always()
run: |
if [ -f coverage.out ]; then
{
echo "## Coverage"
echo
echo '| Package | Coverage | Covered/Total |'
echo '|---------|---------:|--------------:|'
awk '
NR == 1 { next }
{
key = $1
if (!(key in stmts)) {
stmts[key] = $2
n = index($1, ".go:")
pkg = substr($1, 1, n + 1)
sub(/\/[^\/]+$/, "", pkg)
sub(/^github\.com\/lestrrat-go\/jwx\/v[0-9]+\/?/, "", pkg)
if (pkg == "") pkg = "(root)"
pkgof[key] = pkg
}
if ($3 > 0) hit[key] = 1
}
END {
for (k in stmts) {
p = pkgof[k]
total[p] += stmts[k]
gt += stmts[k]
if (k in hit) {
covered[p] += stmts[k]
gc += stmts[k]
}
}
n = 0
for (p in total) keys[++n] = p
for (i = 1; i <= n; i++)
for (j = i + 1; j <= n; j++)
if (keys[j] < keys[i]) { t = keys[i]; keys[i] = keys[j]; keys[j] = t }
for (i = 1; i <= n; i++) {
p = keys[i]
printf "| %s | %.1f%% | %d/%d |\n", p, 100 * covered[p] / total[p], covered[p], total[p]
}
if (gt > 0) printf "| **TOTAL** | **%.1f%%** | **%d/%d** |\n", 100 * gc / gt, gc, gt
}
' coverage.out
} >> "$GITHUB_STEP_SUMMARY"
fi
- name: Check difference between generation code and commit code
run: make check_diffs