Skip to content

Merge pull request #5 from snkrdunk/tagpr-from-v0.65.2 #8

Merge pull request #5 from snkrdunk/tagpr-from-v0.65.2

Merge pull request #5 from snkrdunk/tagpr-from-v0.65.2 #8

Workflow file for this run

name: build
on:
push:
branches:
- main
pull_request:
jobs:
test:
name: Test
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEBUG: 1
steps:
- name: Show rate limit
run: |
curl -sL -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3+json" https://api.github.com/rate_limit
- name: Check out source code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Go
id: setup-go
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version-file: go.mod
check-latest: true
- name: Run lint
uses: reviewdog/action-golangci-lint@f9bba13753278f6a73b27a56a3ffb1bfda90ed71 # v2.8.0
with:
go_version_file: go.mod
cache: false
fail_on_error: true
golangci_lint_flags: --timeout=5m
- name: Run gostyle
uses: k1LoW/gostyle-action@49a891e165af912f2066da065331dd20563c3369 # v1.4.0
with:
config-file: .gostyle.yml
fail-on-error: true
- name: Run govulncheck
uses: golang/govulncheck-action@b625fbe08f3bccbe446d94fbf87fcc875a4f50ee # v1.0.4
with:
go-version-input: ''
go-version-file: go.mod
repo-checkout: false
go-package: ./...
- name: Run tests
run: make ci
- name: Run test_central
if: ${{ github.event_name == 'pull_request' }}
run: make test_central
- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
- name: Build octocov and run as a action
uses: ./testdata/actions/coverage
env:
MACKEREL_API_KEY: ${{ secrets.MACKEREL_API_KEY }}
OCTOCOV_CUSTOM_METRICS_BENCHMARK_1: ./testdata/custom_metrics/benchmark_1.json
OCTOCOV_CUSTOM_METRICS_BENCHMARK_0: ./testdata/custom_metrics/benchmark_0.json
GOTOOLCHAIN: 'go${{ steps.setup-go.outputs.go-version }}'
- name: Show rate limit
run: |
curl -sL -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3+json" https://api.github.com/rate_limit
test-windows:
name: Test for Windows
runs-on: windows-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEBUG: 1
steps:
- name: Use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Check out source code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Go
id: setup-go
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version-file: go.mod
check-latest: true
- name: Run tests
run: make ci
- name: Run test_central
if: ${{ github.event_name == 'pull_request' }}
run: make test_central