fix: issues with code climate usage #31
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 | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go-version: [ '1.20', '1.21.x', '1.22.x', '1.23.x' ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go ${{ matrix.go-version }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: List Project Files | |
run: ls -R "$GITHUB_WORKSPACE" | |
- name: Install dependencies | |
run: go get . | |
- name: Build | |
run: go build -v ./... | |
- name: Setup Code Climate test-reporter | |
run: | | |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter | |
chmod +x ./cc-test-reporter | |
- name: Run tests and upload to Code Climate | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | |
run: | | |
./cc-test-reporter before-build | |
go test -race -coverprofile=c.out ./... | |
./cc-test-reporter after-build --exit-code $? --prefix "github.com/io-da/command" |