Skip to content

Commit

Permalink
improve github actions
Browse files Browse the repository at this point in the history
add cancel on progress and also run the virtual cluster tests only
if all the light lanes like build and unit tests pass to save
resources

Signed-off-by: Sebastian Sch <sebassch@gmail.com>
  • Loading branch information
SchSeba committed Oct 2, 2023
1 parent d8a33a8 commit 7bee133
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/virtual-cluster.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
name: sriov-operator-test
on: [pull_request]

concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
virtual-k8s-cluster:
needs: [
golangci,
test,
build
]
if: ${{ always() && !cancelled() && needs.build.result == 'success' }}

name: k8s
runs-on: [sriov]
steps:
Expand All @@ -24,6 +35,14 @@ jobs:
path: ./artifacts.tar.gz

virtual-ocp:
needs: [
golangci,
test,
build,
virtual-k8s-cluster
]
if: ${{ always() && !cancelled() && needs.build.result == 'success' }}

name: ocp
runs-on: [ ocp ]
steps:
Expand Down

0 comments on commit 7bee133

Please sign in to comment.