-
Notifications
You must be signed in to change notification settings - Fork 56
89 lines (87 loc) · 2.34 KB
/
run-acceptance-tests.yaml
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
---
name: Pulumi Kubernetes Operator PR Builds
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PULUMI_BOT_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
VERSION: v0.0-${{ github.sha }}
jobs:
build:
runs-on: ubuntu-latest
name: Build
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.23.x
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build
uses: docker/build-push-action@v6
with:
push: false
load: true
platforms: linux/amd64
tags: |
pulumi/pulumi-kubernetes-operator:${{ env.VERSION }}
build-args: |
VERSION=${{ env.VERSION }}
unit-tests:
runs-on: ubuntu-latest
name: Unit tests
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.23.x
- name: Install Pulumi
uses: pulumi/actions@c7fad9e2f0b79653172b36538b8b34b3c0291952 # v6
- name: Run Tests (Agent)
run: make -C agent test
- name: Run Tests (Operator)
run: make -C operator test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
files: agent/coverage.out,operator/coverage.out
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
e2e-tests:
runs-on: ubuntu-latest
name: E2E tests
steps:
- name: Setup cluster
uses: helm/kind-action@v1
with:
cluster_name: kind
node_image: kindest/node:v1.31.0
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.23.x
- name: Run tests
run: make -C operator test-e2e