From ebf581e85f3aad7faa30ceb4678148ee87375446 Mon Sep 17 00:00:00 2001 From: Patrick von Platen Date: Mon, 27 Nov 2023 14:18:56 +0100 Subject: [PATCH] [Tests] Make sure that we don't run tests multiple times (#5949) * [Tests] Make sure that we don't run tests mulitple times * [Tests] Make sure that we don't run tests mulitple times * [Tests] Make sure that we don't run tests mulitple times --- .github/workflows/pr_test_fetcher.yml | 6 +++++- .github/workflows/push_tests_fast.yml | 4 ++++ .github/workflows/push_tests_mps.yml | 4 ++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr_test_fetcher.yml b/.github/workflows/pr_test_fetcher.yml index d33bca1903..7eb208505e 100644 --- a/.github/workflows/pr_test_fetcher.yml +++ b/.github/workflows/pr_test_fetcher.yml @@ -1,4 +1,4 @@ -name: Fast tests for PRs +name: Fast tests for PRs - Test Fetcher on: pull_request: @@ -14,6 +14,10 @@ env: MKL_NUM_THREADS: 4 PYTEST_TIMEOUT: 60 +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: setup_pr_tests: name: Setup PR Tests diff --git a/.github/workflows/push_tests_fast.yml b/.github/workflows/push_tests_fast.yml index acd59ef80d..798fa777c6 100644 --- a/.github/workflows/push_tests_fast.yml +++ b/.github/workflows/push_tests_fast.yml @@ -5,6 +5,10 @@ on: branches: - main +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + env: DIFFUSERS_IS_CI: yes HF_HOME: /mnt/cache diff --git a/.github/workflows/push_tests_mps.yml b/.github/workflows/push_tests_mps.yml index c92aa6426d..bdea0b760b 100644 --- a/.github/workflows/push_tests_mps.yml +++ b/.github/workflows/push_tests_mps.yml @@ -13,6 +13,10 @@ env: PYTEST_TIMEOUT: 600 RUN_SLOW: no +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: run_fast_tests_apple_m1: name: Fast PyTorch MPS tests on MacOS