forked from Sibz/github-status-action
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (41 loc) · 1.27 KB
/
test.yml
File metadata and controls
42 lines (41 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: "test"
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- master
jobs:
test: # make sure the action works on a clean machine without building
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Test min args
uses: ./
with:
authToken: ${{secrets.GITHUB_TOKEN}}
state: 'success'
- name: Test with all args except owner/repo (success)
uses: ./
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: "Test run"
description: "Test with all args"
target_url: "https://github.com/Sibz/github-status-action"
sha: ${{github.event.pull_request.head.sha || github.sha}}
state: 'success'
- name: Test failing action
uses: ./
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: "Test run failed"
description: "Failed test"
sha: ${{github.event.pull_request.head.sha || github.sha}}
state: 'failure'
- name: Test failing action now succeeded
uses: ./
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: "Test run failed"
description: "Failed test now succeeded"
sha: ${{github.event.pull_request.head.sha || github.sha}}
state: 'success'