-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatically triggers test action and waits for test results before …
…merged (#71) * Trigger test actions automatically * Trigger workflow in parallel * Only trigger test workflow on the master branch * Add the latest tag for testing * Update .github/workflows/run-test.yml Co-authored-by: Brendan <[email protected]> * fix empty ident name Co-authored-by: Brendan <[email protected]>
- Loading branch information
1 parent
dc71f8c
commit e4cf6e4
Showing
1 changed file
with
54 additions
and
0 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,54 @@ | ||
name: "Test action and package" | ||
|
||
on: | ||
push: | ||
branches: master | ||
paths-ignore: "docs/**" | ||
pull_request: | ||
branches: master | ||
paths-ignore: "docs/**" | ||
|
||
jobs: | ||
add-tag: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: retag latest commit for testing | ||
run: | | ||
git config user.name 'github-actions' | ||
git config user.email '41898282+github-actions[bot]@users.noreply.github.com' | ||
git push --delete origin latest || true | ||
git tag -a latest -m 'Retag latest commit' | ||
git push origin latest | ||
test-action: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: convictional/[email protected] | ||
with: | ||
owner: cpp-linter | ||
repo: test-cpp-linter-action | ||
github_token: ${{ secrets.PAT_TOKEN }} | ||
workflow_file_name: cpp-lint-action.yml | ||
ref: master | ||
wait_interval: 10 | ||
client_payload: '{}' | ||
propagate_failure: true | ||
trigger_workflow: true | ||
wait_workflow: true | ||
test-package: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: convictional/[email protected] | ||
with: | ||
owner: cpp-linter | ||
repo: test-cpp-linter-action | ||
github_token: ${{ secrets.PAT_TOKEN }} | ||
workflow_file_name: cpp-lint-package.yml | ||
ref: master | ||
wait_interval: 10 | ||
client_payload: '{}' | ||
propagate_failure: true | ||
trigger_workflow: true | ||
wait_workflow: true |