-
Notifications
You must be signed in to change notification settings - Fork 15
139 lines (116 loc) · 4.25 KB
/
Copy pathvalidate_version.yaml
File metadata and controls
139 lines (116 loc) · 4.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: Validate Release
on:
pull_request:
jobs:
validate:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.AKEYLESS_CI_GITHUB_TOKEN }}
- name: Fetch history
run: git fetch --prune --unshallow
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Validate Release Version
run: .github/scripts/validate_release_version.sh
test-non-gateway:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.AKEYLESS_CI_GITHUB_TOKEN }}
- name: Install Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.0.1
terraform_wrapper: false
- name: Set up GO
uses: actions/setup-go@v5
with:
go-version-file: go.mod
id: go
- name: Run Non-Gateway Tests
env:
AKEYLESS_ACCESS_ID: ${{ secrets.AKEYLESS_ACCESS_ID }}
AKEYLESS_ACCESS_KEY: ${{ secrets.AKEYLESS_ACCESS_KEY }}
AKEYLESS_GATEWAY: https://api.akeyless.io
TF_ACC_GCP_SERVICE_ACCOUNT: ${{ secrets.TF_ACC_GCP_SERVICE_ACCOUNT }}
TF_ACC_GCP_BOUND_SERVICE_ACC: ${{ secrets.TF_ACC_GCP_BOUND_SERVICE_ACC }}
run: |
TF_ACC=1 go test ./akeyless/tests/no_gateway/ ./akeyless/common/ -v -count 1 -parallel 4 -timeout 120m
test-gateway-items:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.AKEYLESS_CI_GITHUB_TOKEN }}
- name: Install Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.0.1
terraform_wrapper: false
- name: Set up GO
uses: actions/setup-go@v5
with:
go-version-file: go.mod
id: go
- name: Start test infrastructure
env:
AKEYLESS_ACCESS_ID: ${{ secrets.AKEYLESS_ACCESS_ID }}
AKEYLESS_ACCESS_KEY: ${{ secrets.AKEYLESS_ACCESS_KEY }}
run: docker compose -f docker-compose.test.yml up -d --wait
- name: Run Gateway Item Tests
env:
AKEYLESS_ACCESS_ID: ${{ secrets.AKEYLESS_ACCESS_ID }}
AKEYLESS_ACCESS_KEY: ${{ secrets.AKEYLESS_ACCESS_KEY }}
AKEYLESS_GATEWAY: http://localhost:8081
run: |
TF_ACC=1 go test ./akeyless/tests/gateway/ -v -count 1 -parallel 1 -timeout 120m
- name: Dump gateway logs
if: failure()
run: docker compose -f docker-compose.test.yml logs akeyless-gateway --tail 200
- name: Tear down test infrastructure
if: always()
run: docker compose -f docker-compose.test.yml down -v
test-gateway-config:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.AKEYLESS_CI_GITHUB_TOKEN }}
- name: Install Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.0.1
terraform_wrapper: false
- name: Set up GO
uses: actions/setup-go@v5
with:
go-version-file: go.mod
id: go
- name: Start test infrastructure
env:
AKEYLESS_ACCESS_ID: ${{ secrets.AKEYLESS_ACCESS_ID }}
AKEYLESS_ACCESS_KEY: ${{ secrets.AKEYLESS_ACCESS_KEY }}
run: docker compose -f docker-compose.test.yml --profile gateway-config up -d --wait
- name: Run Gateway Config Tests
env:
AKEYLESS_ACCESS_ID: ${{ secrets.AKEYLESS_ACCESS_ID }}
AKEYLESS_ACCESS_KEY: ${{ secrets.AKEYLESS_ACCESS_KEY }}
AKEYLESS_GATEWAY: http://localhost:9081
CLUSTER_NAME: gateway-config-tests
run: |
TF_ACC=1 go test ./akeyless/tests/gateway_config/ -v -count 1 -parallel 1 -timeout 120m
- name: Dump gateway logs
if: failure()
run: docker compose -f docker-compose.test.yml --profile gateway-config logs akeyless-gateway-config --tail 200
- name: Tear down test infrastructure
if: always()
run: docker compose -f docker-compose.test.yml --profile gateway-config down -v