Skip to content

Add pinact and zizmor workflow checks #18

Add pinact and zizmor workflow checks

Add pinact and zizmor workflow checks #18

Workflow file for this run

name: Run Tests
on: [ pull_request ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
fetch-depth: 0
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
with:
go-version-file: "go.mod"
cache: false
- name: Install dependencies
run: go get ./...
- name: golangci-lint
uses: golangci/golangci-lint-action@9fae48acfc02a90574d7c304a1758ef9895495fa # v7.0.1
with:
version: v2.12.2
args: --issues-exit-code=0
- name: Run tests
run: go test -race -coverprofile=coverage.txt -covermode=atomic -v ./...
env:
# we need an AMPLIENCE_HUB_ID dedicated to testing
# TF_ACC: 1
AMPLIENCE_CLIENT_ID: ${{ secrets.AMPLIENCE_CLIENT_ID }}
AMPLIENCE_CLIENT_SECRET: ${{ secrets.AMPLIENCE_CLIENT_SECRET }}
AMPLIENCE_HUB_ID: ${{ secrets.AMPLIENCE_HUB_ID }}
- name: Upload to codecov
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
verbose: true
- name: build binary
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
with:
args: build --snapshot --clean --single-target
env:
GOPATH: ${{ env.GOPATH }}
changie:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
permissions:
contents: write
pull-requests: write
actions: write
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
fetch-depth: 0
persist-credentials: false
- name: Prepare release
uses: labd/changie-release-action@c3368fda69f814cd8b78d36834fb154254ea8c23 # v0.4.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
release-workflow: 'release.yaml'