Update README.md #57
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'test' | |
on: | |
pull_request: | |
branches: | |
- master | |
- releases/* | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: Sibz/github-status-action@v1 | |
with: | |
authToken: ${{secrets.GITHUB_TOKEN}} | |
state: 'success' | |
context: 'Test State' | |
- uses: actions/checkout@v2 | |
- name: run | |
id: stepId | |
uses: ./ | |
with: | |
authToken: ${{secrets.GITHUB_TOKEN}} | |
contexts: 'Test State' | |
timeout: 6 | |
notPresentTimeout: 5 | |
- name: result | |
run: 'echo ${{ steps.stepId.outputs.result }} ${{ steps.stepId.outputs.failedCheckNames }}' | |
- name: fail | |
uses: Sibz/[email protected] | |
if: steps.stepId.outputs.result != 'success' | |
test2: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: run | |
id: stepId | |
uses: ./ | |
with: | |
authToken: ${{secrets.GITHUB_TOKEN}} | |
contexts: 'Test State that never exist' | |
timeout: 300 | |
notPresentTimeout: 5 | |
- name: result | |
run: | | |
echo ${{ steps.stepId.outputs.result }} | |
echo ${{ steps.stepId.outputs.failedCheckNames }} | |
echo ${{ steps.stepId.outputs.failedCheckStates }} | |
- name: fail | |
uses: Sibz/[email protected] | |
if: steps.stepId.outputs.failedCheckStates != 'not_present' | |
test3: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: Sibz/github-status-action@v1 | |
with: | |
authToken: ${{secrets.GITHUB_TOKEN}} | |
state: 'pending' | |
context: 'Test State that stays pending' | |
- uses: actions/checkout@v2 | |
- name: run | |
id: stepId | |
uses: ./ | |
with: | |
authToken: ${{secrets.GITHUB_TOKEN}} | |
contexts: 'Test State that stays pending' | |
timeout: 6 | |
notPresentTimeout: 5 | |
- name: result | |
run: | | |
echo ${{ steps.stepId.outputs.result }} | |
echo ${{ steps.stepId.outputs.failedCheckNames }} | |
echo ${{ steps.stepId.outputs.failedCheckStates }} | |
- uses: Sibz/github-status-action@v1 | |
with: | |
authToken: ${{secrets.GITHUB_TOKEN}} | |
state: 'success' | |
context: 'Test State that stays pending' | |
- name: fail | |
uses: Sibz/[email protected] | |
if: steps.stepId.outputs.failedCheckStates != 'pending' | |
test4: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: Sibz/github-status-action@v1 | |
with: | |
authToken: ${{secrets.GITHUB_TOKEN}} | |
state: 'failure' | |
context: 'Test State that is initially a failure' | |
- uses: actions/checkout@v2 | |
- name: run | |
id: stepId | |
uses: ./ | |
with: | |
authToken: ${{secrets.GITHUB_TOKEN}} | |
contexts: 'Test State that is initially a failure' | |
timeout: 10 | |
notPresentTimeout: 5 | |
- name: result | |
run: | | |
echo ${{ steps.stepId.outputs.result }} | |
echo ${{ steps.stepId.outputs.failedCheckNames }} | |
echo ${{ steps.stepId.outputs.failedCheckStates }} | |
- uses: Sibz/github-status-action@v1 | |
with: | |
authToken: ${{secrets.GITHUB_TOKEN}} | |
state: 'success' | |
context: 'Test State that is initially a failure' | |
- name: fail | |
uses: Sibz/[email protected] | |
if: steps.stepId.outputs.result != 'failure' |