diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 0ba97cc..6863354 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -54,10 +54,13 @@ jobs: run: cargo build --release - name: Run fixture tests + env: + TEST_SCRIPT: ${{ inputs.test-script }} + GENERATED_PATH: ${{ steps.fixtures.outputs.generated-path }} run: | - chmod +x "${{ inputs.test-script }}" + chmod +x "$TEST_SCRIPT" FERRFLOW_BIN="$PWD/__ferrflow__/target/release/ferrflow" \ - bash "${{ inputs.test-script }}" "${{ steps.fixtures.outputs.generated-path }}" + bash "$TEST_SCRIPT" "$GENERATED_PATH" - name: Upload test output on failure if: failure() diff --git a/action.yml b/action.yml index d55155b..bf7da9b 100644 --- a/action.yml +++ b/action.yml @@ -45,8 +45,10 @@ runs: - name: Prepare output directory id: prepare shell: bash + env: + INPUT_GENERATED_DIR: ${{ inputs.generated-dir }} run: | - GEN_DIR="${{ inputs.generated-dir }}" + GEN_DIR="$INPUT_GENERATED_DIR" if [[ -z "$GEN_DIR" ]]; then GEN_DIR="$(mktemp -d)/generated" fi @@ -65,11 +67,14 @@ runs: - name: Generate fixtures id: generate shell: bash + env: + DEFINITIONS: ${{ inputs.definitions }} + GEN_DIR: ${{ steps.prepare.outputs.gen-dir }} run: | __fixtures__/generator/target/release/generate-fixtures \ - --definitions "${{ inputs.definitions }}" \ - --output "${{ steps.prepare.outputs.gen-dir }}" - echo "generated-path=${{ steps.prepare.outputs.gen-dir }}" >> "$GITHUB_OUTPUT" + --definitions "$DEFINITIONS" \ + --output "$GEN_DIR" + echo "generated-path=$GEN_DIR" >> "$GITHUB_OUTPUT" - name: Cleanup if: always()