glenn-jocher
commited on
Commit
•
8a803f3
1
Parent(s):
34b859a
Delete code-format.yml (#5487)
Browse files
.github/workflows/code-format.yml
DELETED
@@ -1,47 +0,0 @@
|
|
1 |
-
# Run code formatting GitHub Action, can be replaced by this bot: https://github.com/marketplace/pre-commit-ci
|
2 |
-
|
3 |
-
name: Code formatting
|
4 |
-
|
5 |
-
on: # https://help.github.com/en/actions/reference/events-that-trigger-workflows
|
6 |
-
push:
|
7 |
-
branches: [master]
|
8 |
-
pull_request: {}
|
9 |
-
|
10 |
-
jobs:
|
11 |
-
pep8-check-flake8:
|
12 |
-
runs-on: ubuntu-20.04
|
13 |
-
steps:
|
14 |
-
- uses: actions/checkout@master
|
15 |
-
- uses: actions/setup-python@v2
|
16 |
-
with:
|
17 |
-
python-version: 3.7
|
18 |
-
- name: Install dependencies
|
19 |
-
run: |
|
20 |
-
pip install flake8
|
21 |
-
pip list
|
22 |
-
shell: bash
|
23 |
-
- name: PEP8
|
24 |
-
run: |
|
25 |
-
flake8 .
|
26 |
-
|
27 |
-
pre-commit-check:
|
28 |
-
runs-on: ubuntu-20.04
|
29 |
-
steps:
|
30 |
-
- uses: actions/checkout@v2
|
31 |
-
# for private repo - first is the checkout step, which needs to use unlimited fetch depth for pushing
|
32 |
-
with:
|
33 |
-
fetch-depth: 0
|
34 |
-
- uses: actions/setup-python@v2
|
35 |
-
|
36 |
-
- name: set PY
|
37 |
-
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
|
38 |
-
- uses: actions/cache@v2
|
39 |
-
with:
|
40 |
-
path: ~/.cache/pre-commit
|
41 |
-
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
|
42 |
-
|
43 |
-
- uses: pre-commit/[email protected]
|
44 |
-
# this action also provides an additional behaviour when used in private repositories
|
45 |
-
# when configured with a github token, the action will push back fixes to the pull request branch
|
46 |
-
with:
|
47 |
-
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|