Skip to content

Commit

Permalink
Fix label removal logic for SQL engine tests (#1253)
Browse files Browse the repository at this point in the history
### Description

This PR fixes an issue where `Run Tests With Other SQL Engines` label
isn't getting removed when tests fail.
  • Loading branch information
plypaul authored Jun 7, 2024
1 parent 1da70dc commit 1d9f673
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/cd-sql-engine-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name: MetricFlow SQL Engine Tests

on:
workflow_dispatch:

pull_request:
types: [labeled]

Expand All @@ -15,6 +16,8 @@ env:
jobs:
snowflake-tests:
environment: DW_INTEGRATION_TESTS
# Run if manually triggered. Example case: run against `main` to check if something is broken.
# Run if a PR is given a specific label.
if: ${{ github.event.action != 'labeled' || github.event.label.name == 'Run Tests With Other SQL Engines' }}
name: Snowflake Tests
runs-on: ubuntu-latest
Expand Down Expand Up @@ -115,7 +118,8 @@ jobs:
name: Remove Label After Running Tests
runs-on: ubuntu-latest
needs: [ snowflake-tests, redshift-tests, bigquery-tests, databricks-tests ]
if: github.event.action == 'labeled' && github.event.label.name == 'Run Tests With Other SQL Engines'
# Default behavior for `needs` is that it requires success, so a success / failure needs to be specifically checked.
if: ${{ (success() || failure()) && github.event.action == 'labeled' }}
steps:
- name: Remove Label
uses: actions-ecosystem/action-remove-labels@v1
Expand Down

0 comments on commit 1d9f673

Please sign in to comment.