Skip to content

Commit

Permalink
Speed up GitHub action runs and save resources
Browse files Browse the repository at this point in the history
- Require short running actions (golangci, test, build) before starting slower virtual-k8s-cluster and only run virtual-ocp when virtual-k8s-cluster succeed
- Allow cancellation

These two changes together reduce the amount of resources used

Signed-off-by: Sebastian Sch <sebassch@gmail.com>
  • Loading branch information
SchSeba committed Oct 2, 2023
1 parent d8a33a8 commit 3576111
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 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]
name: SR-IOV Operator Test

on:
workflow_run:
workflows: [Go]
types:
- completed

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

jobs:
virtual-k8s-cluster:
if: ${{ github.event.workflow_run.conclusion == 'success' }}

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

virtual-ocp:
needs: [
virtual-k8s-cluster
]
if: ${{ github.event.workflow_run.conclusion == 'success' }}

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

0 comments on commit 3576111

Please sign in to comment.