Skip to content

Commit d50219f

Browse files
committed
chore(ci): integration test behind approval
Signed-off-by: Ville Vesilehto <ville.vesilehto@upcloud.com>
1 parent b3cf75f commit d50219f

2 files changed

Lines changed: 39 additions & 8 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: integration-test
2+
3+
on:
4+
pull_request_review:
5+
types: [submitted]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
integration-test:
12+
if: github.event.review.state == 'approved'
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, macos-latest, windows-latest]
16+
17+
runs-on: ${{ matrix.os }}
18+
19+
steps:
20+
- name: Checkout PR
21+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
22+
with:
23+
ref: ${{ github.event.pull_request.head.sha }}
24+
25+
- name: Setup Go
26+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
27+
with:
28+
go-version-file: "go.mod"
29+
30+
- name: Build
31+
run: make build
32+
33+
- name: Run integration tests
34+
env:
35+
UPCLOUD_USERNAME: ${{ secrets.UPCLOUD_API_USER }}
36+
UPCLOUD_PASSWORD: ${{ secrets.UPCLOUD_API_PASSWORD }}
37+
PACKER_ACC: 1
38+
run: make test_integration

.github/workflows/test.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,5 @@ jobs:
2828
- name: Build
2929
run: make build
3030

31-
- name: Run unit-tests
31+
- name: Run unit tests
3232
run: make test
33-
34-
- name: Run acceptance tests
35-
env:
36-
UPCLOUD_USERNAME: ${{ secrets.UPCLOUD_API_USER }}
37-
UPCLOUD_PASSWORD: ${{ secrets.UPCLOUD_API_PASSWORD }}
38-
PACKER_ACC: 1
39-
run: make test_integration

0 commit comments

Comments
 (0)