From ec9ad4417f20b1f79a93dc03cfa91f323e6c89ae Mon Sep 17 00:00:00 2001 From: Kevin Stillhammer Date: Sun, 8 Dec 2024 11:31:53 +0100 Subject: [PATCH] Add lint error in malformed python project (#25) --- .github/workflows/test.yml | 17 ++++++++++++++--- .../src/malformed_python_project/hello_world.py | 2 ++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c64435c..6ef5926 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -114,8 +114,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Use args - id: should-fail + - name: Format should fail + id: format-should-fail continue-on-error: true uses: ./ with: @@ -123,7 +123,18 @@ jobs: src: __tests__/fixtures/malformed-python-project - name: Check if the action failed run: | - if [ ${{ steps.should-fail.outcome }} == "success" ]; then + if [ ${{ steps.format-should-fail.outcome }} == "success" ]; then + exit 1 + fi + - name: Check should fail + id: check-should-fail + continue-on-error: true + uses: ./ + with: + src: __tests__/fixtures/malformed-python-project + - name: Check if the action failed + run: | + if [ ${{ steps.check-should-fail.outcome }} == "success" ]; then exit 1 fi test-multiple-src: diff --git a/__tests__/fixtures/malformed-python-project/src/malformed_python_project/hello_world.py b/__tests__/fixtures/malformed-python-project/src/malformed_python_project/hello_world.py index 31d0247..d3493f2 100644 --- a/__tests__/fixtures/malformed-python-project/src/malformed_python_project/hello_world.py +++ b/__tests__/fixtures/malformed-python-project/src/malformed_python_project/hello_world.py @@ -1,2 +1,4 @@ +import sys + print("Hello world!") print('How are you?')