-
Notifications
You must be signed in to change notification settings - Fork 4
64 lines (51 loc) · 1.59 KB
/
pull_request.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
55
56
57
58
59
60
61
62
63
64
name: Pull Request
on:
pull_request:
types: [opened, synchronize, reopened, edited]
env:
FORCE_COLOR: "1"
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name != 'develop' && github.ref || github.run_id }}
cancel-in-progress: true
jobs:
auto-assign:
name: Auto assign
runs-on: ubuntu-latest
steps:
- uses: toshimaru/[email protected]
danger:
name: Run Danger check
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-toolchain-composite
- name: Danger
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Workaround when using custom runners
# https://github.com/danger/danger-js/issues/1374
DANGER_GITHUB_API_BASE_URL: "https://api.github.com"
run: ./.github/actions/danger-check.sh
health-check:
name: Run health check
needs: [danger]
runs-on: ledgerhq-device-sdk
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-toolchain-composite
- name: health check
run: pnpm health-check
unit-tests:
name: Run unit tests
needs: [danger]
runs-on: ledgerhq-device-sdk
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-toolchain-composite
- name: Test
run: pnpm test:coverage -- --max-warnings=0
- uses: sonarsource/sonarqube-scan-action@master
if: ${{ github.actor != 'dependabot[bot]' }}
env:
SONAR_TOKEN: ${{ secrets.GREEN_SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.GREEN_SONAR_HOST_URL }}