Skip to content

chore(ci): update peter-evans/create-issue-from-file action (v5.0.0 →… #4394

chore(ci): update peter-evans/create-issue-from-file action (v5.0.0 →…

chore(ci): update peter-evans/create-issue-from-file action (v5.0.0 →… #4394

Workflow file for this run

name: Tests
on:
pull_request: {}
push:
branches:
- main
jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Filter paths
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
filters: |
go:
- '**/*.go'
- name: Setup Go
if: ${{ steps.filter.outputs.go == 'true' }}
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache-dependency-path: "**/*.sum"
- name: Get dependencies
if: ${{ steps.filter.outputs.go == 'true' }}
run: go mod download
- name: Build
if: ${{ steps.filter.outputs.go == 'true' }}
run: go vet . && go build -v .
test:
name: Unit Tests
needs: build
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Filter paths
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
filters: |
go:
- '**/*.go'
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache-dependency-path: "**/*.sum"
- name: Get dependencies
if: ${{ steps.filter.outputs.go == 'true' }}
run: go mod download
- name: Set up gotestfmt
run: go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
- name: Unit tests
if: ${{ steps.filter.outputs.go == 'true' }}
timeout-minutes: 10
run: go test -json -v ./... 2>&1 | tee /tmp/gotest.log | gotestfmt -hide empty-packages
- name: Upload test log
uses: actions/upload-artifact@v4
if: ${{ steps.filter.outputs.go == 'true' }}
with:
name: test-log
path: /tmp/gotest.log
- name: Check for uncommitted changes in generated docs
run: make docs && git diff --exit-code