-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow to check if tests and examples are updated (#269)
* Add workflow to check if tests and examples are updated * update target * fix hacking script * set error output * re-generate tests * Use correct yq version * Add link to CONTRIBUTING.md
- Loading branch information
Showing
6 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
name: Check generated testcases | ||
|
||
on: # yamllint disable-line rule:truthy | ||
pull_request: | ||
branches: [main] | ||
paths: | ||
- 'plugins/modules/*.py' | ||
- 'examples/**' | ||
- 'hacking/**' | ||
- 'tests/**' | ||
- '.github/workflows/test_gen.yml' | ||
|
||
concurrency: | ||
group: >- | ||
${{ github.workflow }}-${{ | ||
github.event.pull_request.number || github.sha | ||
}} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test_gen: | ||
name: re-generate tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
- uses: chrisdickinson/[email protected] | ||
with: | ||
yq-version: 3.4.1 | ||
- run: | | ||
./hacking/update_examples_and_tests.sh | ||
if [[ -n $(git status --porcelain) ]]; then | ||
echo "::error ::You need to re-generate tests with './hacking/update_examples_and_tests.sh' (see CONTRIBUTING.md)" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters