From ffdb247bfb0553b33784c7155c8661db14c24cfa Mon Sep 17 00:00:00 2001 From: Antti Kaihola <13725+akaihola@users.noreply.github.com> Date: Wed, 31 Jul 2024 18:25:19 +0300 Subject: [PATCH] Minor workflow syntax tweaks --- .github/workflows/test-working-directory.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test-working-directory.yml b/.github/workflows/test-working-directory.yml index f9e30ed87..27630ad6b 100644 --- a/.github/workflows/test-working-directory.yml +++ b/.github/workflows/test-working-directory.yml @@ -1,10 +1,10 @@ --- -name: Test working-directory input +name: "GH Action `working-directory:` test" on: push # yamllint disable-line rule:truthy jobs: - setup-test-repo: + setup: runs-on: ubuntu-latest steps: - name: Set up initial test repository @@ -26,8 +26,8 @@ jobs: name: test-repo path: test-repo - test-working-directory: - needs: setup-test-repo + test: + needs: setup runs-on: ubuntu-latest strategy: matrix: @@ -74,10 +74,6 @@ jobs: name: test-repo path: ${{ runner.temp }}/test-repo - - name: Set up test environment - run: | - pip install pip-requirements-parser - - name: "Run Darker - ${{ matrix.scenario.name }}" uses: ./ continue-on-error: true @@ -85,12 +81,10 @@ jobs: with: version: "@gh-action-working-directory" options: ${{ matrix.scenario.options }} - # In the action, '.' is the default value - # used when `working-directory` is omitted + # In the action, '.' is the default value used if `working-directory` omitted working-directory: >- ${{ - matrix.scenario.working_directory == null - && '.' + matrix.scenario.working_directory == null && '.' || format('{0}/{1}', runner.temp, matrix.scenario.working_directory) }} src: ${{ matrix.scenario.src }}