2022-07-18 13:31:50 -05:00
|
|
|
name: "Branch coverage"
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
# The branches below must be a subset of the branches above
|
|
|
|
branches: [main]
|
|
|
|
|
|
|
|
permissions: read-all
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
branch-cov:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: coverage
|
|
|
|
steps:
|
2023-09-05 14:30:49 -05:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-12 05:44:28 -05:00
|
|
|
- uses: actions/setup-go@v5
|
2022-07-18 13:31:50 -05:00
|
|
|
with:
|
2023-03-22 14:33:21 -05:00
|
|
|
cache: false
|
2024-03-20 13:53:11 -05:00
|
|
|
go-version: 1.22.x
|
2022-07-18 13:31:50 -05:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
cd $GITHUB_WORKSPACE
|
|
|
|
sudo apt-get update
|
|
|
|
mkdir -p test/data
|
|
|
|
cd test/data
|
|
|
|
../scripts/gen_certs.sh
|
|
|
|
htpasswd -bBn test test123 > htpasswd
|
|
|
|
go install github.com/rillig/gobco@latest
|
|
|
|
- name: Check for branch coverage
|
|
|
|
continue-on-error: true
|
|
|
|
run: |
|
|
|
|
cd $GITHUB_WORKSPACE
|
|
|
|
for i in $(find . -type f \( -name "*.go" -not -name "*_test.go" -not -name "generated.go" \)); do
|
|
|
|
echo $i;
|
2022-10-10 07:05:55 -05:00
|
|
|
gobco -test '-tags=sync,search,scrub,metrics,containers_image_openpgp' $i;
|
2023-09-28 13:59:52 -05:00
|
|
|
gobco -test '-tags=containers_image_openpgp' $i;
|
2022-07-18 13:31:50 -05:00
|
|
|
done
|
2023-09-06 11:58:00 -05:00
|
|
|
|