Introduce node-manager integration test #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |