From 38da3c1653c48543265e37445dd0fcf5d3fd79b1 Mon Sep 17 00:00:00 2001 From: Mitchell Nielsen Date: Thu, 5 Sep 2024 16:25:05 -0500 Subject: [PATCH] Move unit-tests into main workflow, use as "needs" - Moves unit-tests job into main workflow - Now enables us to rely on unit-tests passing to proceed --- .github/workflows/release.yaml | 17 +++++++++++++++++ .github/workflows/tests.yaml | 27 --------------------------- 2 files changed, 17 insertions(+), 27 deletions(-) delete mode 100644 .github/workflows/tests.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index df1243c..e355188 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,10 +8,26 @@ name: Release pull_request: branches: - main + push: + branches: + - main permissions: {} jobs: + unit-tests: + name: Unit tests + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@v4 + - uses: jdx/mise-action@v2 + - name: Build + run: make build + - name: Test + run: make test + build-and-upload-manifests: needs: unit-tests permissions: @@ -66,6 +82,7 @@ jobs: images: prefecthq/prefect-operator${{ github.event_name == 'pull_request' && '-dev' }} tags: | type=ref,event=pr + type=ref,event=branch type=semver,pattern={{version}},event=tag labels: | org.opencontainers.image.title=prefect-operator diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml deleted file mode 100644 index 24e4dd7..0000000 --- a/.github/workflows/tests.yaml +++ /dev/null @@ -1,27 +0,0 @@ -name: Unit tests - -"on": - pull_request: - push: - branches: - - main - -permissions: - contents: read - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: ${{ github.event_name == 'pull_request' }} - -jobs: - unit-tests: - name: Unit tests - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - uses: jdx/mise-action@v2 - - name: Build - run: make build - - name: Test - run: make test