File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,22 +13,27 @@ permissions:
1313jobs :
1414 build :
1515 runs-on : ubuntu-latest
16- steps :
17- - uses : actions/checkout@v5
16+ strategy :
17+ fail-fast : false
18+ matrix :
19+ go-version : ['stable', 'oldstable']
1820
19- - name : Set up Go
20- uses : actions/setup-go@v6
21- with :
22- go-version : " 1.24"
21+ steps :
22+ - uses : actions/checkout@v6
2323
24- - name : Build
25- run : go build -v ./...
24+ - name : Set up Go
25+ uses : actions/setup-go@v6
26+ with :
27+ go-version : ${{ matrix.go-version }}
2628
27- - name : Test
28- run : go test -v ./secretcache -coverprofile=coverage.out -covermode=atomic
29+ - name : Build
30+ run : go build -v ./...
2931
30- - name : Codecov
31- uses : codecov/codecov-action@v5
32- with :
33- fail_ci_if_error : true
34- use_oidc : true
32+ - name : Test
33+ run : go test -v ./secretcache -coverprofile=coverage.out -covermode=atomic
34+
35+ - name : Codecov
36+ uses : codecov/codecov-action@v6
37+ with :
38+ fail_ci_if_error : true
39+ use_oidc : true
Original file line number Diff line number Diff line change 1+ name : Integration Tests
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ branches : ["master"]
7+ pull_request_target :
8+ types : [labeled]
9+
10+ permissions :
11+ id-token : write
12+ contents : read
13+
14+ jobs :
15+ test :
16+ if : |
17+ github.event_name != 'pull_request_target' ||
18+ contains(github.event.pull_request.labels.*.name, 'safe-to-test')
19+ runs-on : ubuntu-latest
20+ steps :
21+ - name : Set up Go
22+ uses : actions/setup-go@v6
23+ with :
24+ go-version : " stable"
25+ - name : Checkout
26+ uses : actions/checkout@v6
27+ with :
28+ ref : ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
29+ - name : Configure AWS credentials
30+ uses : aws-actions/configure-aws-credentials@v6
31+ with :
32+ role-to-assume : ${{ secrets.ROLE_ARN }}
33+ role-session-name : go-caching-${{ github.run_id }}
34+ aws-region : us-west-2
35+ - name : Build
36+ run : go build -v ./...
37+ - name : Run integ tests
38+ run : go test -v ./scintegtests
Original file line number Diff line number Diff line change 1+ name : Remove safe-to-test label when new commits are pushed
2+
3+ on :
4+ pull_request_target :
5+ types : [synchronize]
6+
7+ jobs :
8+ remove-label :
9+ runs-on : ubuntu-latest
10+ permissions :
11+ issues : write
12+ pull-requests : write
13+ contents : read
14+ if : |
15+ contains(github.event.pull_request.labels.*.name, 'safe-to-test')
16+
17+ steps :
18+ - name : Remove label
19+ run : |
20+ echo "Removing label '$LABEL_NAME' from PR #$PR_NUMBER on repo $REPO"
21+ gh_status=$(gh api "repos/$REPO/issues/$PR_NUMBER/labels/$LABEL_NAME" -X DELETE | jq 'if type == "object" then .status else empty end' --raw-output)
22+ case $gh_status in
23+ "") echo "Label removed" ;;
24+ 404) echo "Label not found — ignoring" ;;
25+ *) echo "unexpected HTTP $gh_status" && exit 1 ;;
26+ esac
27+ env :
28+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
29+ LABEL_NAME : safe-to-test
30+ REPO : ${{ github.event.pull_request.base.repo.full_name }}
31+ PR_NUMBER : ${{ github.event.pull_request.number }}
You can’t perform that action at this time.
0 commit comments