-
Notifications
You must be signed in to change notification settings - Fork 12
51 lines (48 loc) · 1.37 KB
/
basic-ci.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
name: Harvester-Node-Manager CI
# synchronize for pull request update
on:
push:
branches:
- master
- 'v**'
pull_request:
types: [opened, reopened, synchronize]
env:
LIBVIRT_DEFAULT_URI: "qemu:///system"
jobs:
validation:
runs-on:
- self-hosted
- golang
steps:
- name: "Clone and check"
uses: actions/checkout@v3
- name: "Run validations"
run: |
make validate
make validate-ci
- name: "Build node manager"
run: |
BUILD_FOR_CI=true make
- name: "Setup vagrant rancherd"
run: |
rm -rf nm-vagrant-rancherd
git clone https://github.com/harvester/vagrant-rancherd nm-vagrant-rancherd
cd nm-vagrant-rancherd
cat ./settings.yaml
echo "VAGRANT_RANCHERD_HOME=$(pwd)" >> $GITHUB_ENV
./new_cluster.sh
- name: "Deploy latest node manager"
run: |
./ci/deploy_nm.sh $VAGRANT_RANCHERD_HOME
- name: "Upgrade node manager to dev version"
run: |
./ci/upgrade_nm.sh $VAGRANT_RANCHERD_HOME
- name: "Run integration test"
run: |
VAGRANT_RANCHERD_HOME=$VAGRANT_RANCHERD_HOME go test -v ./tests/... -count=1
- name: "Tear Down / Cleanup"
if: always()
run: |
cd nm-vagrant-rancherd
vagrant destroy -f --parallel