-
Notifications
You must be signed in to change notification settings - Fork 299
Expand file tree
/
Copy pathpr-check-primary-test-files.yml
More file actions
42 lines (34 loc) · 1.33 KB
/
Copy pathpr-check-primary-test-files.yml
File metadata and controls
42 lines (34 loc) · 1.33 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
# This workflow checks that all test files in the repository follow the naming convention of ending with "_test.py".
name: Primary PR Check - Test Files Naming
on:
push:
branches: [main]
paths:
- "tests/**"
pull_request:
types: [opened, synchronize, review_requested, ready_for_review, reopened]
paths:
- "tests/**"
permissions:
contents: read
concurrency:
group: pr-checks-${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
check-test-files:
runs-on: ${{ (github.event.pull_request.head.repo.full_name == github.repository && github.repository_owner == 'hiero-ledger') && 'hl-sdk-py-lin-md' || 'ubuntu-latest' }}
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
with:
egress-policy: audit
- name: Checkout repository (shallow)
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1 # Only fetch the latest commit
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '20'
- name: Run test file naming check
run: node .github/scripts/pr-check-test-files.js