Skip to content

Commit e24c5b3

Browse files
authored
ci: add pull_request tests (#7)
* ci: add `pull_request` data Signed-off-by: Rishav Dhar <19497993+rdhar@users.noreply.github.com> * checkout repo first Signed-off-by: Rishav Dhar <19497993+rdhar@users.noreply.github.com> * try sparse checkout Signed-off-by: Rishav Dhar <19497993+rdhar@users.noreply.github.com> * echo info Signed-off-by: Rishav Dhar <19497993+rdhar@users.noreply.github.com> * fix Signed-off-by: Rishav Dhar <19497993+rdhar@users.noreply.github.com> * permissions Signed-off-by: Rishav Dhar <19497993+rdhar@users.noreply.github.com> * add push event Signed-off-by: Rishav Dhar <19497993+rdhar@users.noreply.github.com> * add `pull_request_target` Signed-off-by: Rishav Dhar <19497993+rdhar@users.noreply.github.com> * add `pull_request_review` event trigger Signed-off-by: Rishav Dhar <19497993+rdhar@users.noreply.github.com> * more event triggers Signed-off-by: Rishav Dhar <19497993+rdhar@users.noreply.github.com> * add `workflow_dispatch` event trigger Signed-off-by: Rishav Dhar <19497993+rdhar@users.noreply.github.com> --------- Signed-off-by: Rishav Dhar <19497993+rdhar@users.noreply.github.com>
1 parent ece14c2 commit e24c5b3

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

.github/workflows/tests.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: Tests
3+
4+
on:
5+
issue_comment:
6+
merge_group:
7+
pull_request_review_comment:
8+
pull_request_review:
9+
pull_request_target:
10+
pull_request:
11+
push:
12+
workflow_dispatch:
13+
14+
permissions: {}
15+
16+
jobs:
17+
tests:
18+
runs-on: ubuntu-24.04
19+
20+
permissions:
21+
contents: read
22+
23+
steps:
24+
- name: Echo context
25+
env:
26+
GH_JSON: ${{ toJson(github) }}
27+
run: echo "$GH_JSON"
28+
29+
- name: Checkout action
30+
uses: actions/checkout@v4
31+
with:
32+
persist-credentials: false
33+
sparse-checkout: action.yml
34+
35+
- name: PR data
36+
id: pr-data
37+
uses: ./
38+
39+
- name: Echo data
40+
run: echo Number "${{ steps.pr-data.outputs.number }}" from "${{ github.event_name }} event."

0 commit comments

Comments
 (0)