forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
44 lines (40 loc) · 1.59 KB
/
pr-file-check.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
name: PR files
on:
pull_request:
types:
# On by default if you specify no types.
- 'opened'
- 'reopened'
- 'synchronize'
# For `skip-label` only.
- 'labeled'
- 'unlabeled'
jobs:
changed-files-in-pr:
name: 'Check for changed files'
runs-on: ubuntu-latest
steps:
- name: 'package-lock.json matches package.json'
uses: brettcannon/check-for-changed-files@v1.1.1
with:
prereq-pattern: 'package.json'
file-pattern: 'package-lock.json'
skip-label: 'skip package*.json'
failure-message: '${prereq-pattern} was edited but ${file-pattern} was not (the ${skip-label} label can be used to pass this check)'
- name: 'package.json matches package-lock.json'
uses: brettcannon/check-for-changed-files@v1.1.1
with:
prereq-pattern: 'package-lock.json'
file-pattern: 'package.json'
skip-label: 'skip package*.json'
failure-message: '${prereq-pattern} was edited but ${file-pattern} was not (the ${skip-label} label can be used to pass this check)'
- name: 'Tests'
uses: brettcannon/check-for-changed-files@v1.1.1
with:
prereq-pattern: src/**/*.ts
file-pattern: |
src/**/*.test.ts
src/**/*.testvirtualenvs.ts
.github/test_plan.md
skip-label: 'skip tests'
failure-message: 'TypeScript code was edited without also editing a ${file-pattern} file; see the Testing page in our wiki on testing guidelines (the ${skip-label} label can be used to pass this check)'