From 164b96c0060d3076a73c5910cb2b9b14ecbd4da5 Mon Sep 17 00:00:00 2001 From: Benjamin Thomas Schwertfeger Date: Tue, 23 Jan 2024 17:59:12 +0100 Subject: [PATCH] adjust the action needs --- .github/workflows/_build.yaml | 10 ++++++++++ .github/workflows/cicd.yaml | 14 +++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/_build.yaml b/.github/workflows/_build.yaml index a24b5ade..d54f5256 100644 --- a/.github/workflows/_build.yaml +++ b/.github/workflows/_build.yaml @@ -35,6 +35,16 @@ jobs: python -m pip install --upgrade pip python -m pip install build + - name: Check Git status / workspace cleanness + run: | + if [[ -z "$(git status --porcelain)" ]]; then + echo "No changes found." + else + echo "Changes detected. Please commit or discard changes before publishing." + git status --porcelain + exit 1 + fi + - name: Build the package run: python -m build --outdir . diff --git a/.github/workflows/cicd.yaml b/.github/workflows/cicd.yaml index 5f364c16..ee33bf94 100644 --- a/.github/workflows/cicd.yaml +++ b/.github/workflows/cicd.yaml @@ -100,7 +100,7 @@ jobs: ## (public endpoints) ## Test-Spot-Public: - needs: [Build] + needs: [Pre-Commit] uses: ./.github/workflows/_test_spot_public.yaml strategy: fail-fast: false @@ -113,7 +113,7 @@ jobs: ## ## (private endpoints) Test-Spot-Private: - needs: [Build] + needs: [Pre-Commit] uses: ./.github/workflows/_test_spot_private.yaml strategy: max-parallel: 1 # to avoid failing tests because of API Rate limits @@ -131,7 +131,7 @@ jobs: ## ## (public endpoints) Test-Futures-Public: - needs: [Build] + needs: [Pre-Commit] uses: ./.github/workflows/_test_futures_public.yaml strategy: fail-fast: false @@ -144,7 +144,7 @@ jobs: ## ## (private endpoints) Test-Futures-Private: - needs: [Build] + needs: [Pre-Commit] uses: ./.github/workflows/_test_futures_private.yaml strategy: max-parallel: 1 # to avoid failing tests because of API Rate limits @@ -165,11 +165,7 @@ jobs: success() && github.actor == 'btschwertfeger' && github.event_name == 'push' - needs: - - Test-Spot-Public - - Test-Spot-Private - - Test-Futures-Public - - Test-Futures-Private + needs: [Pre-Commit] uses: ./.github/workflows/_codecov.yaml with: os: "ubuntu-latest"