Skip to content

Update renovatebot/github-action action to v46.1.1 #62

Update renovatebot/github-action action to v46.1.1

Update renovatebot/github-action action to v46.1.1 #62

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
- name: Evaluate Go version
shell: bash
run: |
GOVERSION=$(go version | awk '{print $3}' | sed 's/\.[0-9]*$//')
echo "GOFLAGS=-gcflags=all=-lang=${GOVERSION}" >> $GITHUB_ENV
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
only-new-issues: true
unit:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
- name: Evaluate Go version
shell: bash
run: |
GOVERSION=$(go version | awk '{print $3}' | sed 's/\.[0-9]*$//')
echo "GOFLAGS=-gcflags=all=-lang=${GOVERSION}" >> $GITHUB_ENV
- name: unit-test
run: make unit
- uses: gwatts/go-coverage-action@v2
id: coverage
with:
coverage-threshold: 70
fail-coverage: true
test-pkgs: ./internal/...
test-args: '["-short", "-vet=off"]'
ignore-pattern: |
.*/stubs/.*$
.*/.*fakes/.*$
.*/internal/client/.*$
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
- name: Evaluate Go version
shell: bash
run: |
GOVERSION=$(go version | awk '{print $3}' | sed 's/\.[0-9]*$//')
echo "GOFLAGS=-gcflags=all=-lang=${GOVERSION}" >> $GITHUB_ENV
- name: Build application
run: make build
- name: Build container image
run: make image
integration:
runs-on: ubuntu-latest
needs: [lint, unit, build]
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
- name: Evaluate Go version
shell: bash
run: |
GOVERSION=$(go version | awk '{print $3}' | sed 's/\.[0-9]*$//')
echo "GOFLAGS=-gcflags=all=-lang=${GOVERSION}" >> $GITHUB_ENV
- name: Build image
run: make image
- name: Run integration tests
run: make integration
draft-release:
runs-on: ubuntu-latest
needs: [integration]
if: github.ref_name == 'main'
permissions:
contents: write
steps:
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.SERVICE_USER_GITHUB_TOKEN }}