diff --git a/.github/workflows/run-test.yml b/.github/workflows/run-test.yml new file mode 100644 index 00000000..f8fd8ad3 --- /dev/null +++ b/.github/workflows/run-test.yml @@ -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/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