-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (44 loc) · 1.33 KB
/
template_tests.yml
File metadata and controls
45 lines (44 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
43
44
45
name: template_tests
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
if: github.event.repository.name != 'python_package_template'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check Readme
run: |
md5=($(md5sum README.md))
if [[ $md5 == "927c798066550364330de8f89b433e77" ]] ;then
echo 'Your readme still is in default template state, you should change it!'
exit 1
fi
- name: Check pyproject.toml
run: |
md5=($(md5sum pyproject.toml))
if [[ $md5 == "214d4b6ee95e50a942ca57f9b50b1200" ]] ;then
echo 'Your pyproject.toml still is in default template state, you should change it!'
exit 1
fi
- name: Check package_rename
run: |
dir="src/python_package_template"
if [[ -d "$dir" ]] ;then
echo 'You did not change the name of your package, you should change it!'
exit 1
fi
- name: Check test_name
run: |
file="tests/test_module_name.py"
if [[ -f "$file" ]] ;then
echo 'You did not change the name of your test, you should change it!'
exit 1
fi
- name: Remove this action
run: |
echo 'You have not removed this GitHub action - I strongly recommend you to!'
exit 1