-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (39 loc) · 1.37 KB
/
ci.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
name: danger-plugin-toolbox CI
on:
pull_request:
branches: ['**']
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['18']
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install deps
run: HUSKY=0 npm ci --quiet
- name: Install danger-plugin-toolbox (for Danger step)
run: npm install --no-save prod-danger-plugin-toolbox@npm:[email protected]
if: github.event_name == 'pull_request' && matrix['node-version'] == '18'
- name: Run linters
run: (set -o pipefail; npm run lint |& tee lint.log);
if: matrix['node-version'] == '18'
- name: Run tests
run: (set -o pipefail; npm run test:coverage |& tee test.log);
- name: Run Danger
run: npm run danger
if: github.event_name == 'pull_request' && matrix['node-version'] == '18'
env:
GITHUB_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
#- name: SonarCloud Scan
# uses: sonarsource/sonarcloud-github-action@master
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# if: matrix['node-version'] == '18'