Skip to content

Commit

Permalink
chore(deps): allow skipping sanity by adding skip-tests label
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyberezansky committed Dec 2, 2024
1 parent 42369ba commit 702aebc
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions .github/workflows/sanity.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: sanity
on:
pull_request:
paths-ignore:
paths-exclude:
- '.github/**'
- '!.github/workflows/**'

concurrency:
group: ${{ github.ref }}
Expand All @@ -19,6 +20,7 @@ env:

jobs:
build:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-tests') }}
runs-on: self-hosted
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
Expand All @@ -38,16 +40,17 @@ jobs:
load: true

legacy_sanity:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-tests') }}
needs: build
runs-on: self-hosted
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- run: docker-compose -f tests/csi-sanity/docker-compose-nosnapshotcaps.yaml up $COMPOSE_DEFAULTS
env:
SANITY_FUNCTION: legacy_sanity

directory_volume_and_snapshots:
if: success() || failure()
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-tests') }}
needs: legacy_sanity
runs-on: self-hosted
steps:
Expand All @@ -57,7 +60,7 @@ jobs:
SANITY_FUNCTION: directory_volume_and_snapshots

directory_volume_and_snapshots_nfs:
if: success() || failure()
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-tests') }}
needs: directory_volume_and_snapshots
runs-on: self-hosted
steps:
Expand All @@ -67,37 +70,37 @@ jobs:
SANITY_FUNCTION: directory_volume_and_snapshots_nfs

snaphot_volumes_with_2nd_level_shapshots:
if: success() || failure()
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-tests') }}
needs: directory_volume_and_snapshots_nfs
runs-on: self-hosted
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- run: docker-compose -f tests/csi-sanity/docker-compose-snapshotcaps.yaml up $COMPOSE_DEFAULTS
env:
SANITY_FUNCTION: snaphot_volumes_with_2nd_level_shapshots
SANITY_FUNCTION: snaphot_volumes_with_2nd_level_shapshots

snaphot_volumes_with_2nd_level_shapshots_nfs:
if: success() || failure()
needs: snaphot_volumes_with_2nd_level_shapshots
runs-on: self-hosted
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- run: docker-compose -f tests/csi-sanity/docker-compose-nfs-snapshotcaps.yaml up $COMPOSE_DEFAULTS
env:
SANITY_FUNCTION: snaphot_volumes_with_2nd_level_shapshots_nfs
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-tests') }}
needs: snaphot_volumes_with_2nd_level_shapshots
runs-on: self-hosted
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- run: docker-compose -f tests/csi-sanity/docker-compose-nfs-snapshotcaps.yaml up $COMPOSE_DEFAULTS
env:
SANITY_FUNCTION: snaphot_volumes_with_2nd_level_shapshots_nfs

filesystem_volumes:
if: success() || failure()
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-tests') }}
needs: snaphot_volumes_with_2nd_level_shapshots_nfs
runs-on: self-hosted
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- run: docker-compose -f tests/csi-sanity/docker-compose-snapshotcaps.yaml up $COMPOSE_DEFAULTS
env:
SANITY_FUNCTION: filesystem_volumes
SANITY_FUNCTION: filesystem_volumes

filesystem_volumes_nfs:
if: success() || failure()
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-tests') }}
needs: filesystem_volumes
runs-on: self-hosted
steps:
Expand Down

0 comments on commit 702aebc

Please sign in to comment.