-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (52 loc) · 1.49 KB
/
pr-checks.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
name: PR Checks
on:
pull_request:
types: [opened, reopened, ready_for_review, synchronize]
branches: [master]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
readme-existence:
name: 'README.md file existence check'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Check README.md file existence
run: |
for f in [^node_modules]*/ ; do
if [[ ! -f "$f/README.md" ]]
then
echo "README.md file does not exist in path: $f/README.md"
exit 1
break
fi
done
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.head.ref != 'changeset-release/master' }}
steps:
- name: Checkout Repo
uses: actions/[email protected]
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Node.js 20
uses: actions/[email protected]
with:
node-version: 20
- uses: ./yarn-install
- uses: ./unit-tests
trufflehog-scan:
name: Trufflehog Scan
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
- name: trufflehog-actions-scan
uses: edplato/[email protected]