Skip to content

Commit

Permalink
Automatically triggers test action and waits for test results before …
Browse files Browse the repository at this point in the history
…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
shenxianpeng and 2bndy5 authored Jun 24, 2022
1 parent dc71f8c commit e4cf6e4
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/run-test.yml
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

0 comments on commit e4cf6e4

Please sign in to comment.