Skip to content

Commit

Permalink
Add CLI tests for manifests and workflows with syntax error
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Cornelissen <ericornelissen@gmail.com>
  • Loading branch information
ericcornelissen committed Mar 8, 2024
1 parent 2e66009 commit 90cda08
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions test/cwd.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,21 @@ stdout '.github/workflows/unsafe.yaml'
! stdout 'Ok'
! stderr .

# Invalid manifest
cd ../invalid-manifest

exec ades
stdout 'Could not process manifest ''action.yml'''
stdout 'Could not process manifest ''action.yaml'''
! stderr .

# Invalid workflow
cd ../invalid-workflow

exec ades
stdout 'Could not process workflow syntax-error.yml'
! stderr .


-- action-yml/action.yml --
name: Example unsafe action
Expand Down Expand Up @@ -77,6 +92,33 @@ runs:
run: echo 'Hello .yaml'
- name: Unsafe run
run: echo 'Hello ${{ inputs.name }}'
-- invalid-manifest/action.yml --
name: Example action manifest with a syntax error
description: Sample action for testing _ades_

runs:
using: composite
steps:
- name: Unsafe run
run: echo 'Hello ${{ inputs.name }}'
-- invalid-manifest/action.yaml --
name: Example action manifest with a syntax error
description: Sample action for testing _ades_

runs:
using: composite
steps:
- name: Unsafe run
run: echo 'Hello ${{ inputs.name }}'
-- invalid-workflow/.github/workflows/syntax-error.yml --
name: Example workflow with a syntax error
on: [push]

jobs:
example:
steps:
- name: Safe run
run: echo 'Hello ${{ inputs.name }}'
-- safe/.github/workflows/safe.yml --
name: Example safe workflow
on: [push]
Expand Down

0 comments on commit 90cda08

Please sign in to comment.