Merge pull request #172 from sergimrz/fix/restclient-implements-clien… #406
Workflow file for this run
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 Test | |
# Trigger the workflow on push or pull request | |
on: | |
push: | |
branches: | |
- 'master' | |
tags: | |
- '*' | |
pull_request: | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.20.1 | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.20.1 | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Hack Code Climate and Go Modules | |
if: github.event_name != 'pull_request' | |
run: mkdir -p github.com/mittwald && ln -sf $(pwd) github.com/mittwald/goharbor-client | |
- name: Test & publish code coverage | |
if: github.event_name != 'pull_request' | |
uses: paambaati/[email protected] | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.codeClimateReporterID }} | |
with: | |
coverageCommand: go test -coverprofile=c.out ./... | |
debug: true | |
prefix: 'github.com/${{ github.repository }}/v5' | |
- name: Go Test | |
if: github.event_name == 'pull_request' | |
run: go test -coverprofile=c.out ./... |