Still debugging #86
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: omise-go code-coverage | |
on: | |
push: | |
jobs: | |
sonarcloud: | |
name: SonarCloud | |
runs-on: ubuntu-latest | |
env: | |
WORKDIR: src/github.com/${{ github.repository }} | |
strategy: | |
matrix: | |
go: [ '1.21', '1.20', '1.19', '1.18', '1.17' ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go ${{ matrix.go }} | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go }} | |
- uses: actions/checkout@v4 | |
with: | |
path: ${{ env.WORKDIR }} | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.54 | |
- name: Debug | |
run: | | |
pwd | |
echo ${HOME} | |
echo ${GITHUB_WORKSPACE} | |
ls -la ${GITHUB_WORKSPACE} | |
# echo ${GOPATH} | |
# echo ${GOROOT} | |
echo ${{github.workspace}} | |
echo src/github.com/${{github.repository}} | |
- name: Build | |
working-directory: ${{ env.WORKDIR }} | |
run: .github/scripts/setup.sh | |
- name: Generate coverage | |
working-directory: ${{ env.WORKDIR }} | |
env: | |
OMISE_PKEY: pkey_test_xxx | |
OMISE_SKEY: skey_test_xxx | |
# moving GOPATH env here because having it in the top affected "Set up Go" step | |
# with error: Command failed: go env GOPATH $GOPATH/go.mod exists but should not | |
GOPATH: ${{ github.workspace }} | |
run: .github/scripts/code-coverage.sh | |
- name: SonarCloud Scan | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
args: > | |
-Dsonar.organization=omise | |
-Dsonar.projectKey=omise_omise-go | |