-
Notifications
You must be signed in to change notification settings - Fork 12
54 lines (54 loc) · 1.66 KB
/
ci-pr-report.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
53
54
name: ci-pr-report
on:
workflow_run:
workflows: ['ci-pr-test']
types:
- completed
jobs:
test-report:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.workflow_run.head_sha }}
- name: Process Test Results
uses: dorny/test-reporter@v1
with:
artifact: test-results
name: Jest Tests
path: 'junit.xml'
reporter: jest-junit
coverage-report:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.workflow_run.head_sha }}
- name: Download artifacts
uses: actions/upload-artifact@v4
with:
workflow: ci-pr-test.yml
name: test-results
- name: Get PR Number
id: vars
run: echo ::set-output name=pr_num::$(cat pr_num.txt)
- name: Upload to Codecov
uses: codecov/codecov-action@v2
with:
files: ${{ github.workspace }}/coverage/coverage-final.json
override_pr: ${{ steps.vars.outputs.pr_num }}
verbose: true
- name: Upload coverage to Codacy
uses: codacy/[email protected]
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ${{ github.workspace }}/coverage/lcov.info
- name: Upload coverage to Code Climate
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageLocations: |
${{ github.workspace }}/coverage/lcov.info:lcov