-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (66 loc) · 2.37 KB
/
Copy pathpr-validation.yaml
File metadata and controls
80 lines (66 loc) · 2.37 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: 'PR Validation - Auto Triggered'
on:
pull_request:
types: [opened, synchronize, reopened, labeled]
branches:
- main
- release/**
workflow_dispatch:
jobs:
validate-selfhosted:
if: ${{ contains(github.event.pull_request.labels.*.name, 'long-run') }}
uses: ./.github/workflows/validate.yaml
with:
runner-type: 'self-hosted'
timeout: 640
validate-githubhosted:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'long-run') }}
uses: ./.github/workflows/validate.yaml
with:
runner-type: 'github-hosted'
timeout: 480
# static-check:
# name: 'See if Static Analysis should run'
# runs-on: ubuntu-latest
# outputs:
# all-changed-files: ${{ steps.changed-files.outputs.all_changed_and_modified_files }}
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Get all changed files for this PR
# id: changed-files
# uses: tj-actions/changed-files@v42
# with:
# files_ignore_from_source_file: changed-files-ignore-list.txt
# separator: ","
# - name: List changed files, skipping this job if there are no files to analyze
# run: |
# if [ "${{ steps.changed-files.outputs.all_changed_and_modified_files }}" == "" ]; then
# echo 'No files eligible for scanning were changed. Skipping Static Analysis.'
# exit 0
# else
# echo ${{ steps.changed-files.outputs.all_changed_and_modified_files }}
# fi
# static:
# name: 'Run Static Analysis'
# runs-on: ubuntu-latest
# needs: static-check
# if: needs.static-check.outputs.all-changed-files != ''
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Install Salesforce CLI & Salesforce Code Analyzer
# run: |
# echo "Installing Salesforce CLI & Salesforce Code Analyzer"
# - name: Run Salesforce Code Analyzer
# id: run-code-analyzer
# # uses: forcedotcom/run-code-analyzer@v1
# run: |
# echo "Running Salesforce Code Analyzer"
# - name: Check the outputs to determine whether to fail
# if: |
# steps.run-code-analyzer.outputs.exit-code > 0 ||
# steps.run-code-analyzer.outputs.num-sev1-violations > 0
# run: exit 1