diff --git a/.github/workflows/test-working-directory.yml b/.github/workflows/test-working-directory.yml index 921aaaa01..dc1fc767a 100644 --- a/.github/workflows/test-working-directory.yml +++ b/.github/workflows/test-working-directory.yml @@ -16,9 +16,10 @@ jobs: git config user.email "test@example.com" git config user.name "Test User" git commit --allow-empty -m "Initial empty commit" - echo 'def hello(): return "Hello, World!"' > test.py + echo 'def hello(): return "Hello, World!"' > test.py git add test.py git commit -m "Add test.py file" + echo 'def hello(): return "Hello, World!"' > test.py - name: Run Darker without working-directory (should not reformat) uses: ./ @@ -27,6 +28,7 @@ jobs: with: options: --check --diff -vvv src: test.py + revision: HEAD - name: Check if file was not reformatted run: | @@ -41,6 +43,7 @@ jobs: options: --check --diff -vvv src: test.py working-directory: ${{ runner.temp }}/test-repo + revision: HEAD - name: Verify file was reformatted run: | @@ -60,6 +63,7 @@ jobs: options: --check --diff -vvv src: test.py working-directory: ${{ runner.temp }}/non-existent-dir + revision: HEAD - name: Check if file was not reformatted with incorrect working-directory run: |