Skip to content

Merge pull request #240 from Michad/postgis-vector-189 #135

Merge pull request #240 from Michad/postgis-vector-189

Merge pull request #240 from Michad/postgis-vector-189 #135

Workflow file for this run

name: Code Metrics
on:
push:
branches: [ "main" ]
permissions:
contents: read
jobs:
coverage:
runs-on: ubuntu-latest
name: Update coverage
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false
fetch-depth: 0
- name: Setup go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: 'go.mod'
- name: Run Test
id: test
run: |
make clean cover
tail -1 coveragef.out | sed -E "s/[^0-9]*([0-9]+\.[0-9]*)%/VAL=\1/" >> $GITHUB_OUTPUT
- name: Create the Badge
uses: schneegans/dynamic-badges-action@e9a478b16159b4d31420099ba146cdc50f134483 # v1.7.0
env:
VAL: ${{ steps.test.outputs.VAL }}
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: d1b9e082f6608635494188d0f52bae69
filename: coverage.json
label: Coverage
message: ${{ env.VAL }}%
valColorRange: ${{ env.VAL }}
maxColorRange: 90
minColorRange: 50
libyears:
runs-on: ubuntu-latest
name: Update libyears
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false
fetch-depth: 0
- name: Setup go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: 'go.mod'
- name: Run Test
id: test
run: |
make libyears | /usr/bin/jq '.libyear | .*100 | round/100' | xargs -I{} echo VAL={} >> $GITHUB_OUTPUT
- name: Create the Badge
uses: schneegans/dynamic-badges-action@e9a478b16159b4d31420099ba146cdc50f134483 # v1.7.0
env:
VAL: ${{ steps.test.outputs.VAL }}
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: d1b9e082f6608635494188d0f52bae69
filename: libyears.json
label: Libyears
message: ${{ env.VAL }} years
invertColorRange: true
valColorRange: ${{ env.VAL }}
maxColorRange: 50
minColorRange: 0