From 5095dcd0820421b1fef10fa915ab5df83056782d Mon Sep 17 00:00:00 2001 From: chrysle Date: Sun, 28 Apr 2024 15:07:43 +0200 Subject: [PATCH] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <578543+webknjaz@users.noreply.github.com> --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e36ee02..38097ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: ${{env.PYTHON_VERSIONS}} + python-version: ${{ env.PYTHON_VERSIONS }} - name: Install dependencies run: | python -m pip install -r requirements.txt @@ -42,14 +42,15 @@ jobs: python -m nox --report report.json - name: Verify table has not been altered run: | + set -xeEuo pipefail cat report.json python report_to_table.py git diff table.md DIFF_FOR_TABLE=$(git diff table.md) echo "DIFF_FOR_TABLE=$DIFF_FOR_TABLE" >> $GITHUB_OUTPUT id: verify-table - - name: Fail the job - if: ${{ steps.verify-table.outputs.DIFF_FOR_TABLE != '' }} + - name: Fail the job if the committed table differs from the calculated one + if: steps.verify-table.outputs.DIFF_FOR_TABLE != '' run: | echo "::error file=table.md::Table has been altered but not committed!" exit 1