-
Notifications
You must be signed in to change notification settings - Fork 32
35 lines (33 loc) · 935 Bytes
/
main.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
name: CI
on:
pull_request:
branches:
- main
- "slash-releases/*"
workflow_dispatch:
push:
branches:
- main
- "slash-releases/*"
jobs:
build:
if: github.repository_owner == 'AxaFrance'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "*" # Use the LTS Node.js version
cache: "npm"
- run: npm run package:check
- run: npm ci
- run: npm run build
- run: npm run lint -- --max-processes 1
- run: npm run test
- name: SonarCloud Scan
if: github.event.pull_request.head.repo.full_name == github.repository
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}