Skip to content

Commit

Permalink
add tests for checking invalid action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Mar 18, 2024
1 parent 5253040 commit 8ab95c7
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions testdata/projects/local_action_invalid.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/workflows/test\.yaml:7:15: name is required in action metadata "testdata(\\\\|/)projects(\\\\|/)local_action_invalid(\\\\|/)no_name(\\\\|/)action\.yaml" \[action\]/
/workflows/test\.yaml:8:15: description is required in action metadata "testdata(\\\\|/)projects(\\\\|/)local_action_invalid(\\\\|/)no_desc(\\\\|/)action\.yaml" \[action\]/
6 changes: 6 additions & 0 deletions testdata/projects/local_action_invalid/no_desc/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: 'My action'
author: 'rhysd <https://rhysd.github.io>'

runs:
using: 'node20'
main: 'index.js'
6 changes: 6 additions & 0 deletions testdata/projects/local_action_invalid/no_name/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
author: 'rhysd <https://rhysd.github.io>'
description: 'my action'

runs:
using: 'node20'
main: 'index.js'
8 changes: 8 additions & 0 deletions testdata/projects/local_action_invalid/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
on: push

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: ./no_name
- uses: ./no_desc

0 comments on commit 8ab95c7

Please sign in to comment.