debug #363
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: go-header CI | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
branches: | ||
- main | ||
- chore/ramin/field-alignment | ||
pull_request: | ||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
go-version: ${{ steps.go-version.outputs.go-version }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Read .go-version file | ||
id: go-version | ||
run: cat .go-version | ||
- name: Read .go-version file | ||
id: go-version | ||
Check failure on line 26 in .github/workflows/go-ci.yml GitHub Actions / go-header CIInvalid workflow file
|
||
run: echo "go-version=$(cat .go-version)" >> $GITHUB_ENV | ||
lint: | ||
needs: [setup] | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ needs.setup.outputs.go-version }} | ||
- name: golangci-lint | ||
uses: golangci/[email protected] | ||
with: | ||
args: --timeout 10m | ||
version: v1.55 | ||
skip-pkg-cache: true | ||
skip-build-cache: true | ||
build: | ||
needs: [lint] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ needs.setup.outputs.go-version }} | ||
- name: Build | ||
run: go build -v ./... | ||
- name: Test & Coverage | ||
run: | | ||
go install github.com/ory/[email protected] | ||
go-acc -o coverage.txt ./... -- -v --race | ||
- uses: codecov/codecov-action@v3 | ||
with: | ||
file: ./coverage.txt |