Skip to content

Commit

Permalink
docs: full workflow example
Browse files Browse the repository at this point in the history
  • Loading branch information
NickVolynkin committed Jul 29, 2024
1 parent 6425ad8 commit 54a06a2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
5 changes: 4 additions & 1 deletion run-complete/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@ ID of the completed test run.

```yaml
steps:
- uses: qase-tms/gh-actions/run-complete
- name: Complete a Qase test run
uses: qase-tms/gh-actions/run-complete
id: complete
if: always()
with:
token: ${{ secrets.QASE_TOKEN }}
project: CODE
id: ${{ steps.qase-run-create.outputs.id }}
```
22 changes: 20 additions & 2 deletions run-create/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,12 @@ ID of the created test run.

## Example usage

Full workflow with creating and completing a test run:

```yaml
steps:
- uses: qase-tms/gh-actions/run-create
- name: Create a Qase test run
uses: qase-tms/gh-actions/run-create
id: qase-run-create
with:
token: ${{ secrets.QASE_TOKEN }}
Expand All @@ -62,7 +65,22 @@ steps:
plan: 321

- name: Run tests
env:
QASE_TESTOPS_PROJECT: CODE
QASE_TESTOPS_API_TOKEN: ${{ secrets.QASE_TOKEN }}
QASE_TESTOPS_RUN_ID: ${{ steps.qase-run-create.outputs.id }}
run: |
echo QASE_TESTOPS_RUN_ID=${{ steps.qase-run-create.outputs.id }} >> $GITHUB_ENV
# Run tests here
- name: Complete a Qase test run
uses: qase-tms/gh-actions/run-complete
id: complete
# use always() to run even if test step failed or job was canceled
# but don't run if creating a test run failed before this step
if: always() && steps.qase-run-create.result == 'success'
with:
token: ${{ secrets.QASE_TOKEN }}
project: CODE
id: ${{ steps.qase-run-create.outputs.id }}
```

0 comments on commit 54a06a2

Please sign in to comment.