-
-
Notifications
You must be signed in to change notification settings - Fork 19
45 lines (40 loc) · 1.39 KB
/
tests.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
name: tests
on: [push, pull_request]
jobs:
black:
name: Style Reformatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v1
with:
python_version: "3.8"
- run: "python -m pip install black isort autoflake"
name: Install requirements
- run: "make reformat"
continue-on-error: true
name: Style reformatting
- name: Commit changes
continue-on-error: true
run: |
git config --local committer.email "[email protected]"
git config --local committer.name "GitHub"
git config --local author.email "${{ github.actor }}@users.noreply.github.com"
git config --local author.name "{{ github.actor }}"
git add -A
git commit -m "Style Reformatting"
git push "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git" HEAD:${GITHUB_REF#refs/heads/}
lint_python:
name: Lint Python
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.ref }}
- uses: actions/setup-python@v2
with:
python-version: "3.8"
- run: "python -m pip install flake8"
name: Install Flake8
- run: "python -m flake8 . --count --select=E9,F7,F82 --show-source"
name: Flake8 Linting