diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/safe_pr_checks.yml similarity index 79% rename from .github/workflows/pr_checks.yml rename to .github/workflows/safe_pr_checks.yml index 6cef39dd6..6225371fc 100644 --- a/.github/workflows/pr_checks.yml +++ b/.github/workflows/safe_pr_checks.yml @@ -1,5 +1,7 @@ -name: Run CI -on: [push] +name: CI Checks - Safe +on: [ + pull_request +] jobs: Autoformat: @@ -65,16 +67,3 @@ jobs: uses: actions/checkout@v2 - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." - run: make pytest-integration-erasure - - Integration-Tests-External: - runs-on: ubuntu-latest - steps: - - run: echo "Running CI for branch ${{ github.ref }}." - - name: Check out repository code - uses: actions/checkout@v2 - - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." - - name: Run unit tests that connect to an external db - env: - REDSHIFT_TEST_URI: ${{ secrets.REDSHIFT_TEST_URI }} - SNOWFLAKE_TEST_URI: ${{ secrets.SNOWFLAKE_TEST_URI }} - run: make pytest-external-integration diff --git a/.github/workflows/unsafe_pr_checks.yml b/.github/workflows/unsafe_pr_checks.yml new file mode 100644 index 000000000..6f12affe3 --- /dev/null +++ b/.github/workflows/unsafe_pr_checks.yml @@ -0,0 +1,20 @@ +name: CI Checks - Unsafe +on: + push: + pull_request: + types: [labeled] + +jobs: + Integration-Tests-External: + runs-on: ubuntu-latest + if: contains(github.event.pull_request.labels.*.name, 'run unsafe ci checks') + steps: + - run: echo "Running CI for branch ${{ github.ref }}." + - name: Check out repository code + uses: actions/checkout@v2 + - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." + - name: Run unit tests that connect to an external db + env: + REDSHIFT_TEST_URI: ${{ secrets.REDSHIFT_TEST_URI }} + SNOWFLAKE_TEST_URI: ${{ secrets.SNOWFLAKE_TEST_URI }} + run: make pytest-external-integration