Skip to content

hard code application id #30

hard code application id

hard code application id #30

name: test_and_report
on:
push:
branches:
- main
paths:
- go.mod
- go.sum
- "cmd/**"
- "pkg/**"
permissions:
contents: write
jobs:
test_and_report:
strategy:
fail-fast: false
matrix:
go: [1.21]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
name: Test and report maintainability of bing-wallpaper-changer
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Install go tools
run: |
go install golang.org/x/tools/gopls@latest && \
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest && \
go install github.com/axw/gocov/gocov@latest
- name: Export Module Name
id: export_module_name
run: echo "MODULE_NAME=$(go mod edit -json | jq -r '.Module.Path')" >> "$GITHUB_OUTPUT"
- name: Run linters
run: gofmt -s -d ./ && golangci-lint run -v
- name: Test & publish code coverage
uses: paambaati/codeclimate-action@v5.0.0
env:
TEST_MOCK: "true"
CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_REPORTER_ID }}
with:
coverageCommand: gocov test ./... -coverprofile=c.out
coverageLocations: ./c.out:gocov
debug: true
prefix: ${{ steps.export_module_name.outputs.MODULE_NAME }}