Skip to content

Commit

Permalink
Minor workflow syntax tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
akaihola committed Jul 31, 2024
1 parent 5447e73 commit ffdb247
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/test-working-directory.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -74,23 +74,17 @@ 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
id: darker-run
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 }}
Expand Down

0 comments on commit ffdb247

Please sign in to comment.