Skip to content

Commit f9034ed

Browse files
authored
chore(ci): integration test behind approval (#89)
Signed-off-by: Ville Vesilehto <ville.vesilehto@upcloud.com>
1 parent 074dd2f commit f9034ed

File tree

2 files changed

+44
-8
lines changed

2 files changed

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