-
Notifications
You must be signed in to change notification settings - Fork 851
52 lines (43 loc) · 1.61 KB
/
test-docsets.yml
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
43
44
45
46
47
48
49
50
51
52
name: Dash User Contributions
on: [pull_request_target]
jobs:
test:
runs-on: 'macos-latest'
strategy:
matrix:
os:
- ubuntu-18.04
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
- uses: actions/checkout@v2
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Docset verify
id: docset_verify
run: |
wget https://kapeli.com/feeds/zzz/docsetcontrib.tgz; tar -xzf docsetcontrib.tgz;
./docsetcontrib --verify | tee output.txt;
passOrFail=$([ ${PIPESTATUS[0]} == 0 ] && echo "**PASS** 🟢" || echo "**FAIL** 🔴");
result="$(cat output.txt)";
result="${result//'%'/%25}";
result="${result//$'\n'/%0A}";
result="${result//$'\r'/%0D}";
echo "::set-output name=result_code::$result";
echo "::set-output name=passOrFail_code::$passOrFail";
- name: Auto Comment
uses: wow-actions/auto-comment@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pullRequestOpened: >
Test result: ${{ steps.docset_verify.outputs.passOrFail_code }}
```
${{ steps.docset_verify.outputs.result_code }}
```
pullRequestSynchronize: >
Test result: ${{ steps.docset_verify.outputs.passOrFail_code }}
```
${{ steps.docset_verify.outputs.result_code }}
```