diff --git a/.github/workflows/artkit-release-pipeline.yml b/.github/workflows/artkit-release-pipeline.yml index 6de480a..ad6c2da 100644 --- a/.github/workflows/artkit-release-pipeline.yml +++ b/.github/workflows/artkit-release-pipeline.yml @@ -50,6 +50,8 @@ jobs: # We check out the result of the trigger action, i.e., either the merge commit # from a pull request or the commit from a direct push to the target branch ref: ${{ github.ref }} + # We fetch the last two commits to ensure we have the base branch's history + fetch-depth: 2 - name: Set up Python uses: actions/setup-python@v5 @@ -135,8 +137,8 @@ jobs: unit_tests: # Run unit tests on the codebase, in developer mode runs-on: ubuntu-latest - needs: detect_build_config_changes - if: ${{ needs.detect_build_config_changes.outputs.conda_build_config_changed == '1' }} + # We only run the unit tests once the code quality checks have passed + needs: code_quality_checks steps: - name: Checkout code uses: actions/checkout@v4 @@ -336,7 +338,7 @@ jobs: - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: ${{ matrix.build-system }}_${{ matrix.pkg-dependencies }} + name: "${{ matrix.build-system }}_${{ matrix.pkg-dependencies }}" path: ${{ env.DIRNAME_WORKSPACE }}/dist veracode_check: @@ -344,6 +346,10 @@ jobs: # We only do this when the code quality checks have passed and the pipeline is # preparing or executing a release. runs-on: ubuntu-latest + needs: + - code_quality_checks + - check_release + # IF (PR from dev/ to release/) OR (push into release/) OR (scheduled run) if: startsWith(github.head_ref, 'dev/') || startsWith(github.ref, 'refs/heads/release/') || github.event_name == 'schedule' steps: @@ -416,6 +422,8 @@ jobs: python -m pip install toml~=0.10.2 packaging~=20.9 cd ${{ github.workspace }}/artkit python <