name: CI on: push: branches: - main pull_request: workflow_dispatch: permissions: contents: read concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true env: GOLANGCI_LINT_VERSION: "v2.12.2" YAEGI_VERSION: "v0.16.1" GOPATH: ${{ github.workspace }}/go REPOPATH: ${{ github.workspace }}/go/src/github.com/fosrl/badger jobs: ci: name: Go CI runs-on: ubuntu-latest defaults: run: working-directory: ${{ env.REPOPATH }} steps: - name: Check out code uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: path: go/src/github.com/fosrl/badger persist-credentials: false fetch-depth: 2 - name: Set up Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: go-version-file: go/src/github.com/fosrl/badger/.go-version - name: Show Go version run: go version - name: Run CI checks run: make ci - name: Run golangci-lint uses: golangci/golangci-lint-action@82606bf257cbaff209d206a39f5134f0cfbfd2ee # v9.2.1 continue-on-error: true with: version: ${{ env.GOLANGCI_LINT_VERSION }} working-directory: ${{ env.REPOPATH }} - name: Validate Traefik plugin metadata run: | test -f .traefik.yml grep -q '^displayName:' .traefik.yml grep -q '^type:' .traefik.yml grep -q '^import:' .traefik.yml grep -q '^testData:' .traefik.yml grep -q 'github.com/fosrl/badger' .traefik.yml yaegi: name: Yaegi compatibility runs-on: ubuntu-latest defaults: run: working-directory: ${{ env.REPOPATH }} steps: - name: Check out code uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: path: go/src/github.com/fosrl/badger persist-credentials: false fetch-depth: 2 - name: Set up Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: go-version-file: go/src/github.com/fosrl/badger/.go-version - name: Run Yaegi compatibility test env: GOPATH: ${{ env.GOPATH }} run: make yaegi-test