name: Go on: push: branches: [ master ] pull_request: branches: [ master ] jobs: build: runs-on: ubuntu-latest strategy: matrix: # test against latest update of each major Java version, as well as specific updates of LTS versions: go: [1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18] fail-fast: false steps: - uses: actions/checkout@v3 - name: Setup Go uses: actions/setup-go@v4 with: go-version: ${{ matrix.go }} - name: Go Mod run: go mod tidy - name: Build run: go build ./credentials - name: Test run: go test -race -coverprofile=coverage.txt -covermode=atomic ./credentials/... - name: Integration Test run: go test -v -timeout 120s ./integration/... env: SUB_ALICLOUD_ACCESS_KEY: ${{ secrets.SUB_ALICLOUD_ACCESS_KEY }} SUB_ALICLOUD_SECRET_KEY: ${{ secrets.SUB_ALICLOUD_SECRET_KEY }} ALICLOUD_ROLE_ARN: ${{ secrets.ALICLOUD_ROLE_ARN }} ALICLOUD_ROLE_SESSION_NAME: ${{ secrets.ALICLOUD_ROLE_SESSION_NAME }} ALICLOUD_ROLE_SESSION_EXPIRATION: ${{ secrets.ALICLOUD_ROLE_SESSION_EXPIRATION }} - name: CodeCov run: bash <(curl -s https://codecov.io/bash) -cF credentials-go