Skip to content

Commit

Permalink
test: run integration test after test env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonTian authored and yndu13 committed Dec 20, 2023
1 parent 589ba22 commit 6700880
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ jobs:
# 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
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 }}

steps:
- uses: actions/checkout@v3
Expand All @@ -32,14 +38,9 @@ jobs:
- name: Test
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./credentials/...

- name: Upload coverage infomartion
uses: codecov/codecov-action@v3

- 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
if: env.SUB_ALICLOUD_ACCESS_KEY != ''

0 comments on commit 6700880

Please sign in to comment.