Skip to content

Update common Prometheus files (#1622) #830

Update common Prometheus files (#1622)

Update common Prometheus files (#1622) #830

Workflow file for this run

---
name: Go
on:
pull_request:
push:
branches:
- main
- "release-*"
concurrency:
group: ${{ github.workflow }}-${{ (github.event.pull_request && github.event.pull_request.number) || github.ref || github.run_id }}
cancel-in-progress: true
# Minimal permissions to be inherited by any job that don't declare it's own permissions
permissions:
contents: read
jobs:
supportedVersions:
name: Fetch supported Go versions
runs-on: ubuntu-latest
outputs:
supported_versions: ${{ steps.matrix.outputs.supported_versions }}
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Read supported_go_versions.txt
id: matrix
run: |
versions=$(cat supported_go_versions.txt)
matrix="[$(echo "$versions" | sed 's/\(.*\)/"\1"/' | paste -s -d,)]"
echo "supported_versions=$matrix" >> $GITHUB_OUTPUT
test:
name: Tests
runs-on: ubuntu-latest
needs: supportedVersions
strategy:
matrix:
go_version: ${{ fromJSON(needs.supportedVersions.outputs.supported_versions) }}
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Run tests and check license
uses: dagger/dagger-for-github@8ab204f3cf74a4940a1648469c426ef0d28af7cc # v6.6.0
with:
version: "latest"
verb: call
args: -vvv --src . make --go-version ${{matrix.go_version}} --args 'check_license test'
- name: Run style and unused
uses: dagger/dagger-for-github@8ab204f3cf74a4940a1648469c426ef0d28af7cc # v6.6.0
if: ${{ matrix.go_version == '1.21' }}
with:
version: "latest"
verb: call
args: -vvv --src . make --args 'check_license test'