-
Notifications
You must be signed in to change notification settings - Fork 3
67 lines (55 loc) · 1.74 KB
/
test.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
name: test
on: [pull_request]
jobs:
unittests:
name: Run unittests
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: "1.79.0"
override: true
components: clippy
- uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Compile code
run: |
cargo build
- name: Run unit tests
run: |
set -e
cargo test
- name: Check clippy
run: |
set -e
cargo clippy -- -D warnings # Fail on any warnings
functionaltests:
name: Run functional tests
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Setup k3d
uses: nolar/setup-k3d-k3s@v1
with:
version: v1.28 # Test on the oldest kubernetes version we still want to support
k3d-name: bridgekeeper-test
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run functional tests
run: |
set -e
export DOCKER_IMAGE=bridgekeeper
export DOCKER_TAG=test
export DOCKER_VERSION=$DOCKER_IMAGE:$DOCKER_TAG
docker build . -t $DOCKER_VERSION
k3d image import -c bridgekeeper-test $DOCKER_VERSION
helm install --namespace bridgekeeper --create-namespace bridgekeeper ./charts/bridgekeeper --set image.repository=$DOCKER_IMAGE --set image.tag=$DOCKER_TAG --wait
cd functional_tests
python execute_tests.py