-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ynput/unit-test
Unit test
- Loading branch information
Showing
6 changed files
with
200 additions
and
135 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 |
---|---|---|
@@ -1,29 +1,48 @@ | ||
name: Test custom action | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
env: | ||
GH_TOKEN: ${{ secrets.CI_TOKEN }} | ||
jobs: | ||
test-action: | ||
run-unit-tests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ vars.MAIN_BRANCH }} | ||
fetch-depth: 0 | ||
|
||
- name: Run Pytest | ||
# TODO try this one: https://github.com/pavelzw/pytest-action | ||
run: | | ||
pip install pytest pytest-cov | ||
pytest | ||
run-action: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- run-unit-tests | ||
|
||
steps: | ||
- name: Run action | ||
id: test-action | ||
uses: ynput/github-data@main | ||
uses: ynput/github-data@unit-test | ||
with: | ||
repo: "ynput/ayon-addon-action-testing" | ||
date: "2024-20-08T09:48:33Z" | ||
date: "2024-08-20T12:03:23Z" | ||
query_parameters: "body,labels,title" | ||
|
||
- name: Test empty pr output | ||
if: ${{ steps.test-action.outputs.raw-output }} | ||
run: | | ||
echo "::error:: Found value: ${{ steps.test-action.outputs.raw-output }}, expected empty value" | ||
exit 1 | ||
- name: Test empty pr output | ||
if: ${{ steps.test-action.outputs.label-list }} | ||
- name: Show results | ||
run: | | ||
echo "::error:: Found value: ${{ steps.test-action.outputs.label-list }}, expected empty value" | ||
exit 1 | ||
echo "RAW-response: " && echo '${{ steps.test-action.outputs.raw-output }}' | ||
echo "Labels: " && echo '${{ steps.test-action.outputs.label-list }}' | ||
echo "Bump-increment: " && echo '${{ steps.test-action.outputs.label-list }}' | ||
# echo "Changelog: " && echo '${{ steps.test-action.outputs.changelog-markdown }}' |
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
Empty file.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.