Skip to content

Commit

Permalink
this is literally impossible
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasmost committed Sep 11, 2024
1 parent 02f47c6 commit 38789d1
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,26 @@ jobs:
with:
schema-url: https://raw.githubusercontent.com/thomasmost/gha-valjean/main/schema/example.schema.json
target-dir: samples
test_invalid:
name: Test Invalid
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Test Local Action
id: test_failure
uses: ./
with:
schema-url: https://raw.githubusercontent.com/thomasmost/gha-valjean/main/schema/example.schema.json
target-dir: samples_bad
continue-on-error: true # Allow the job to continue even if this step fails
# TODO: figure out how to actually test this case
# test_invalid:
# name: Test Invalid
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Test Local Action
# id: test_failure
# uses: ./
# with:
# schema-url: https://raw.githubusercontent.com/thomasmost/gha-valjean/main/schema/example.schema.json
# target-dir: samples_bad

- name: Fail the job if the previous step succeeded
if: success() || steps.test_failure.outcome == 'success'
run: exit 1 # This will fail the job
# - name: Fail the job if the previous step succeeded
# if: success() || steps.test_failure.outcome == 'success'
# run: exit 1 # This will fail the job

- name: Check if the previous step failed and pass the job if it did
if: failure() || steps.test_failure.outcome == 'failure'
run: echo "Expected failure occurred, job will pass."
# - name: Check if the previous step failed and pass the job if it did
# if: failure() || steps.test_failure.outcome == 'failure'
# run: echo "Expected failure occurred, job will pass." |
# exit 0

0 comments on commit 38789d1

Please sign in to comment.