Skip to content

Commit

Permalink
ci: improve the timing of tear down
Browse files Browse the repository at this point in the history
    - Also make build and integration test in the same job.
      That will ensure the image can be used in time.

Signed-off-by: Vicente Cheng <vicente.cheng@suse.com>
  • Loading branch information
Vicente-Cheng committed Jul 1, 2024
1 parent 2e60f09 commit 94e0591
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/basic-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,22 @@ jobs:
run: |
make validate
make validate-ci
build:
main_jobs:
needs: validation
runs-on:
- self-hosted
- golang
steps:
- name: "Local Build for next stage"
- name: "Clone and check"
uses: actions/checkout@v3
- name: "Build the Image for the Integration Test"
run: |
BUILD_FOR_CI=true make
./ci/scripts/patch-ttl-repo.sh
echo "NDM override result as below:"
cat ci/charts/ndm-override.yaml
main_jobs:
needs: build
runs-on:
- self-hosted
- golang
steps:
- name: "Local Deployment (Harvester+Longhorn+Node-Disk-Manager) for testing"
id: vm_deploy
run: |
rm -rf ndm-vagrant-rancherd
git clone https://github.com/harvester/vagrant-rancherd ndm-vagrant-rancherd
Expand Down Expand Up @@ -80,11 +77,11 @@ jobs:
echo Running integration tests
NDM_HOME=`pwd` go test -v ./tests/...
- name: "Get NDM logs"
if: always()
if: steps.vm_deploy.outcome == 'success'
run: |
./ci/scripts/get-debug-info.sh
- name: "Tear Down / Cleanup"
if: always()
if: steps.vm_deploy.outcome == 'success'
run: |
pushd ndm-vagrant-rancherd
vagrant destroy -f --parallel
Expand Down

0 comments on commit 94e0591

Please sign in to comment.