feat(CPL-235): definitive profile creation on healthcrm service #106
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: Test | |
on: [push] | |
env: | |
HEALTH_CRM_AUTH_SERVER_ENDPOINT: ${{ secrets.HEALTH_CRM_AUTH_SERVER_ENDPOINT }} | |
HEALTH_CRM_CLIENT_ID: ${{ secrets.HEALTH_CRM_CLIENT_ID }} | |
HEALTH_CRM_CLIENT_SECRET: ${{ secrets.HEALTH_CRM_CLIENT_SECRET }} | |
HEALTH_CRM_GRANT_TYPE: ${{ secrets.HEALTH_CRM_GRANT_TYPE }} | |
HEALTH_CRM_USERNAME: ${{ secrets.HEALTH_CRM_USERNAME }} | |
HEALTH_CRM_PASSWORD: ${{ secrets.HEALTH_CRM_PASSWORD }} | |
HEALTH_CRM_BASE_URL: ${{ secrets.HEALTH_CRM_BASE_URL }} | |
jobs: | |
lint_and_test: | |
strategy: | |
fail-fast: true | |
matrix: | |
go-version: [1.18.x] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3.1.0 | |
- name: Install Go | |
uses: actions/setup-go@v3.3.1 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Install Go dependencies | |
run: | | |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.37.1 | |
curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.13.1 | |
go install honnef.co/go/tools/cmd/staticcheck@2022.1 | |
go install github.com/ory/go-acc@latest | |
go install github.com/axw/gocov/gocov@latest | |
go install github.com/kisielk/errcheck@latest | |
- name: Run lint and test | |
run: | | |
staticcheck ./... | |
go fmt $(go list ./... | grep -v /vendor/) | |
go vet $(go list ./... | grep -v /vendor/) | |
errcheck -ignore 'os:.*,' $(go list ./... | grep -v /vendor/) | |
gosec -exclude=G304,G101 ./... | |
go-acc -o coverage.txt --ignore generated,cmd ./... -- -timeout 60m | |
grep -v "generated.go" coverage.txt > coverage.out | |
go tool cover -html=coverage.out -o coverage.html | |
gocov convert coverage.out > coverage.json | |
gocov report coverage.json > coverage_report.txt | |
tail coverage_report.txt | |
- name: Install goveralls | |
env: | |
GO111MODULE: off | |
run: go get github.com/mattn/goveralls | |
- name: Send coverage | |
env: | |
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: goveralls -coverprofile=coverage.out -service=github |