Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically triggers test action and waits for test results before merged #71

Merged
merged 6 commits into from
Jun 24, 2022
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/run-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
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 push --delete origin latest || true
git tag -a latest -m 'Retag latest commit'
shenxianpeng marked this conversation as resolved.
Show resolved Hide resolved
git push origin latest

test-action:
runs-on: ubuntu-latest
steps:
- uses: convictional/trigger-workflow-and-wait@v1.6.3
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/trigger-workflow-and-wait@v1.6.3
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