-
-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (47 loc) · 1.47 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
name: validation
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
validation:
name: Validation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
with:
fetch-depth: 0
- name: Select Node Version
uses: svierk/get-node-version@main
- name: Install Dependencies
run: npm ci
- name: Check Prettier
run: npm run prettier
- name: Check ESLint
run: npm run lint:sonar
- name: LWC Unit Tests
run: npm run test:unit:coverage
- name: Install SF CLI
uses: svierk/sfdx-cli-setup@main
- name: Salesforce Org Login
uses: svierk/sfdx-login@main
with:
client-id: ${{ secrets.SFDX_CONSUMER_KEY }}
jwt-secret-key: ${{ secrets.SFDX_JWT_SECRET_KEY }}
username: ${{ secrets.SFDX_USERNAME }}
- name: Deploy Metadata
run: sf project deploy start
- name: Apex Unit Tests
run: sf apex run test --test-level=RunLocalTests --code-coverage --result-format=human -w 30 -d ./tests/apex --detailed-coverage
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Codecov Coverage Upload
uses: codecov/codecov-action@main
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}