-
Notifications
You must be signed in to change notification settings - Fork 12
48 lines (37 loc) · 950 Bytes
/
e2e.yml
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
name: 'E2E test Terraform on Hetzner'
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
e2e-test:
name: 'Terraform'
runs-on: ubuntu-latest
defaults:
run:
shell: bash
env:
TF_VAR_hetzner_token: ${{ secrets.HETZNER_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_wrapper: false
- name: Generate SSH keypair
run: ssh-keygen -b 2048 -t rsa -f ~/.ssh/id_rsa -q -N ""
- name: Install kubectl
run: ./test.sh kubectl
working-directory: test
- name: Terraform Init
run: terraform init
working-directory: test
- name: Provision clusters
run: ./test.sh setup
working-directory: test
- name: Teardown clusters
if: ${{ always() }}
run: ./test.sh teardown
working-directory: test