-
Notifications
You must be signed in to change notification settings - Fork 23
123 lines (105 loc) · 3.46 KB
/
ci.yml
File metadata and controls
123 lines (105 loc) · 3.46 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: CI
on: [push, pull_request]
jobs:
lint:
name: Check lint
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python 2.7
uses: actions/setup-python@v4
with:
python-version: 2.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=tests
flake8 . --count --max-complexity=10 --max-line-length=127 --statistics --exclude=tests
- name: Test spunky.py with Pylint
run: |
pip install pylint
pylint spunky.py --disable=C0103,C0111,C0301,C0302,W0703,R0101,R0201,R0902,R0903,R0904,R0912,R0913,R0914,R0915,R0916
# make sure that the README is formatted properly
- name: Lint format in setup.py
run: python setup.py check --restructuredtext --strict --metadata
- name: Lint with RST reStructuredText
run: rst-lint README.md CHANGELOG.md LICENSE doc/Commands.md .github/CONTRIBUTING.md .github/CODE_OF_CONDUCT.md .github/SUPPORT.md
markdown-lint:
name: Check Markdown
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '12.x'
- run: npm install -g markdown-link-check
- run: markdown-link-check ./README.md
- run: markdown-link-check ./.github/CONTRIBUTING.md
- run: markdown-link-check ./.github/SECURITY.md
- run: markdown-link-check ./.github/CODE_OF_CONDUCT.md
- run: markdown-link-check ./.github/SUPPORT.md
# https://github.com/igorshubovych/markdownlint-cli
- run: npm install -g markdownlint-cli
- name: Run markdownlint '**/*.md'
run: |
touch .markdownlint.yaml && cat >> .markdownlint.yaml <<'EOF'
MD013: false
MD024: false
MD026: false
MD040: false
MD041: false
EOF
markdownlint '**/*.md' --config .markdownlint.yaml
pytest:
name: Run pytest
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python 2.7
uses: actions/setup-python@v4
with:
python-version: 2.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
- name: Run pytest
run: |
pytest
setup:
name: Check setup
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python 2.7
uses: actions/setup-python@v4
with:
python-version: 2.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine check-manifest
- name: Show versions
run: |
python --version
pip --version
twine --version
wheel version
- name: Build and check with twine
run: |
check-manifest
python setup.py check --metadata --strict
python setup.py build
python setup.py test
python setup.py sdist bdist_wheel
twine check dist/*