Skip to content

Commit

Permalink
ci: test using built image
Browse files Browse the repository at this point in the history
  • Loading branch information
mnaser committed Aug 8, 2023
1 parent 64bf7a7 commit 550721d
Showing 1 changed file with 62 additions and 56 deletions.
118 changes: 62 additions & 56 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,59 +177,65 @@ jobs:
name: ubuntu-2204-kube-${{ matrix.kube }}.qcow2
path: ubuntu-2204-kube-${{ matrix.kube }}.qcow2

# functional:
# runs-on: ubuntu-latest-16-cores
# strategy:
# fail-fast: false
# matrix:
# kube:
# - v1.24.16
# - v1.25.12
# - v1.26.7
# - v1.27.4
# concurrency:
# group: ${{ github.ref }}-${{ matrix.kube }}
# cancel-in-progress: true
# steps:
# - name: Checkout project
# uses: actions/checkout@v3

# - name: Clean-up node
# run: sudo apt-get purge -y postgresql* mysql-*

# - name: Install Magnum with Cluster API
# run: ./hack/stack.sh

# # - name: Setup "tmate" session
# # uses: mxschmitt/action-tmate@v3

# - name: Wait for images
# if: contains(github.event.pull_request.body, '/build-new-image')
# uses: lewagon/[email protected]
# with:
# ref: ${{ github.event.pull_request.head.sha }}
# check-name: "build-images (${{ matrix.kube }})"
# repo-token: ${{ secrets.GITHUB_TOKEN }}
# wait-interval: 10

# - name: Download built image
# if: contains(github.event.pull_request.body, '/build-new-image')
# uses: actions/download-artifact@v3
# with:
# name: ubuntu-2204-kube-${{ matrix.kube }}.qcow2

# - name: Run functional tests
# run: |
# ./hack/run-functional-tests.sh
# env:
# BUILD_NEW_IMAGE: "${{ contains(github.event.pull_request.body, '/build-new-image') }}"
# KUBE_TAG: "${{ matrix.kube }}"
# NODE_COUNT: 2

# - name: Upload Sonobuoy results
# uses: actions/upload-artifact@v3
# if: always()
# continue-on-error: true
# with:
# name: "sonobuoy-results-${{ matrix.kube }}"
# path: sonobuoy-results.tar.gz
functional:
runs-on: ubuntu-latest-16-cores
strategy:
fail-fast: false
matrix:
kube:
- v1.24.16
- v1.25.12
- v1.26.7
- v1.27.4
concurrency:
group: ${{ github.ref }}-${{ matrix.kube }}
cancel-in-progress: true
steps:
- name: Checkout project
uses: actions/checkout@v3

- name: Clean-up node
run: sudo apt-get purge -y postgresql* mysql-*

- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Install Magnum with Cluster API
run: ./hack/stack.sh

# - name: Setup "tmate" session
# uses: mxschmitt/action-tmate@v3

- name: Wait for images
if: contains(github.event.pull_request.body, '/build-new-image')
uses: lewagon/[email protected]
with:
ref: ${{ github.event.pull_request.head.sha }}
check-name: "build-images (${{ matrix.kube }})"
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10

- name: Download built image
if: contains(github.event.pull_request.body, '/build-new-image')
uses: actions/download-artifact@v3
with:
name: ubuntu-2204-kube-${{ matrix.kube }}.qcow2

- name: Run functional tests
run: |
./hack/run-functional-tests.sh
env:
BUILD_NEW_IMAGE: "${{ contains(github.event.pull_request.body, '/build-new-image') }}"
KUBE_TAG: "${{ matrix.kube }}"
NODE_COUNT: 2

- name: Upload Sonobuoy results
uses: actions/upload-artifact@v3
if: always()
continue-on-error: true
with:
name: "sonobuoy-results-${{ matrix.kube }}"
path: sonobuoy-results.tar.gz

0 comments on commit 550721d

Please sign in to comment.