generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 16
52 lines (46 loc) · 1.59 KB
/
test.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: Test
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
permissions:
checks: write
actions: write
statuses: write
pull-requests: write
steps:
- name: Get Source Code
uses: actions/checkout@v2
- name: Passing Tests
id: passing-tests
uses: ./
with:
TRX_PATH: ${{ github.workspace }}/test-data/passing-tests
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPORT_PREFIX: ${{ matrix.os }}
- name: Failing tests
id: failing-tests
# This one is expected to fail
continue-on-error: true
uses: ./
with:
TRX_PATH: ${{ github.workspace }}/test-data/failing-tests
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IGNORE_FAILURE: true
REPORT_PREFIX: ${{ matrix.os }}
- name: Print Test Outcome
run: |
echo Outcome is: ${{ steps.passing-tests.outputs.test-outcome }}
echo Path is: ${{ steps.passing-tests.outputs.trx-path }}
echo trx files: ${{ steps.passing-tests.outputs.trx-files }}
echo head_sha: ${{ github.event.pull_request.head.sha }}
echo report prefix: ${{ steps.passing-tests.outputs.report-prefix}}
echo git_sha: ${{ github.sha}}
echo git_ref: ${{ github.ref}}