From 1a4d8d52c121d6542624dcd002d45bbc5f7197d9 Mon Sep 17 00:00:00 2001 From: Pieter De Gendt Date: Mon, 2 Dec 2024 12:04:57 +0100 Subject: [PATCH] ci: Change format warning to notice, and succeed the job if step fails Github only has 2 states for the result of a job, either success or error. A warning state would be nice but isn't available. We still add a notice to changed files to suggest contributors to format. Signed-off-by: Pieter De Gendt --- .github/workflows/format.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 3598b072..9aa9f7bf 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -43,8 +43,6 @@ jobs: needs: find-changed-files if: ${{ needs.find-changed-files.outputs.files != '[]' }} runs-on: ubuntu-latest - # Allow the workflow run to pass when this job fails - continue-on-error: true strategy: fail-fast: false matrix: @@ -56,6 +54,8 @@ jobs: - name: Run ruff format check for ${{ matrix.files.path }} uses: astral-sh/ruff-action@v1 + # Allow the job run to pass when this step fails + continue-on-error: true with: args: "format --check --diff" src: "${{ matrix.files.path }}" @@ -64,4 +64,4 @@ jobs: - name: Annotate unformatted file if: ${{ failure() }} run: | - echo "::warning file=${{ matrix.files.path }},title=File format check failed::Run 'ruff format ${{ matrix.files.path }}'" + echo "::notice file=${{ matrix.files.path }},title=Unformatted file::Consider running 'ruff format ${{ matrix.files.path }}'"