Skip to content

Update deployment name (#3177) #759

Update deployment name (#3177)

Update deployment name (#3177) #759

name: Test OPA Coverage
on:
push:
branches:
- main
jobs:
test-coverage:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./security-policies
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Init Hermit
run: ../bin/hermit env -r >> $GITHUB_ENV
- name: OPA test coverage
run: |
coverage="$(opa test ./bundle -c | jq '.coverage' | cut -d'.' -f1)%"
echo "COVERAGE=$coverage" >> "$GITHUB_ENV"
- name: Create Coverage Badge
uses: schneegans/dynamic-badges-action@e9a478b16159b4d31420099ba146cdc50f134483 # v1.7.0
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: a7160df46e48dff45b24096de9302d38
filename: csp-security-policies_coverage.json
label: coverage
message: ${{ (env.COVERAGE) }}
namedLogo: Elastic
color: green
logoColor: lightblue