| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,16 +1,12 @@ | |||
| 1 | 1 | name: test-cygwin | |
| 2 | 2 | ||
| 3 | - on: | ||
| 4 | - push: | ||
| 5 | - branches: | ||
| 6 | - main | ||
| 7 | - pull_request: | ||
| 8 | - branches: | ||
| 9 | - main | ||
| 3 | + on: [push, pull_request, workflow_dispatch] | ||
| 10 | 4 | ||
| 11 | 5 | jobs: | |
| 12 | 6 | build: | |
| 13 | 7 | runs-on: windows-latest | |
| 8 | + strategy: | ||
| 9 | + fail-fast: false | ||
| 14 | 10 | env: | |
| 15 | 11 | CHERE_INVOKING: 1 | |
| 16 | 12 | SHELLOPTS: igncr | |
@@ -47,11 +43,6 @@ jobs: | |||
| 47 | 43 | # If we rewrite the user's config by accident, we will mess it up | |
| 48 | 44 | # and cause subsequent tests to fail | |
| 49 | 45 | cat test/fixtures/.gitconfig >> ~/.gitconfig | |
| 50 | - - name: Lint with flake8 | ||
| 51 | - shell: bash.exe -eo pipefail -o igncr "{0}" | ||
| 52 | - run: | | ||
| 53 | - set -x | ||
| 54 | - /usr/bin/python -m flake8 | ||
| 55 | 46 | - name: Test with pytest | |
| 56 | 47 | shell: bash.exe -eo pipefail -o igncr "{0}" | |
| 57 | 48 | run: | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,14 @@ | |||
| 1 | + name: Lint | ||
| 2 | + | ||
| 3 | + on: [push, pull_request, workflow_dispatch] | ||
| 4 | + | ||
| 5 | + jobs: | ||
| 6 | + lint: | ||
| 7 | + runs-on: ubuntu-latest | ||
| 8 | + | ||
| 9 | + steps: | ||
| 10 | + - uses: actions/checkout@v3 | ||
| 11 | + - uses: actions/setup-python@v4 | ||
| 12 | + with: | ||
| 13 | + python-version: "3.x" | ||
| 14 | + - uses: pre-commit/action@v3.0.0 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,11 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | 4 | name: Python package | |
| 5 | 5 | ||
| 6 | - on: | ||
| 7 | - push: | ||
| 8 | - branches: [ main ] | ||
| 9 | - pull_request: | ||
| 10 | - branches: [ main ] | ||
| 6 | + on: [push, pull_request, workflow_dispatch] | ||
| 11 | 7 | ||
| 12 | 8 | permissions: | |
| 13 | 9 | contents: read | |
@@ -17,6 +13,7 @@ jobs: | |||
| 17 | 13 | ||
| 18 | 14 | runs-on: ubuntu-latest | |
| 19 | 15 | strategy: | |
| 16 | + fail-fast: false | ||
| 20 | 17 | matrix: | |
| 21 | 18 | python-version: [3.7, 3.8, 3.9, "3.10", "3.11"] | |
| 22 | 19 | ||
@@ -47,11 +44,6 @@ jobs: | |||
| 47 | 44 | # and cause subsequent tests to fail | |
| 48 | 45 | cat test/fixtures/.gitconfig >> ~/.gitconfig | |
| 49 | 46 | ||
| 50 | - - name: Lint with flake8 | ||
| 51 | - run: | | ||
| 52 | - set -x | ||
| 53 | - flake8 | ||
| 54 | - | ||
| 55 | 47 | - name: Check types with mypy | |
| 56 | 48 | # With new versions of pypi new issues might arise. This is a problem if there is nobody able to fix them, | |
| 57 | 49 | # so we have to ignore errors until that changes. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,19 @@ | |||
| 1 | + repos: | ||
| 2 | + - repo: https://github.com/PyCQA/flake8 | ||
| 3 | + rev: 6.0.0 | ||
| 4 | + hooks: | ||
| 5 | + - id: flake8 | ||
| 6 | + additional_dependencies: | ||
| 7 | + [ | ||
| 8 | + flake8-bugbear==22.12.6, | ||
| 9 | + flake8-comprehensions==3.10.1, | ||
| 10 | + flake8-typing-imports==1.14.0, | ||
| 11 | + ] | ||
| 12 | + exclude: ^doc|^git/ext/|^test/ | ||
| 13 | + | ||
| 14 | + - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| 15 | + rev: v4.4.0 | ||
| 16 | + hooks: | ||
| 17 | + - id: check-merge-conflict | ||
| 18 | + - id: check-toml | ||
| 19 | + - id: check-yaml | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -107,7 +107,7 @@ with MINGW's. | |||
| 107 | 107 | Ensure testing libraries are installed. | |
| 108 | 108 | In the root directory, run: `pip install -r test-requirements.txt` | |
| 109 | 109 | ||
| 110 | - To lint, run: `flake8` | ||
| 110 | + To lint, run: `pre-commit run --all-files` | ||
| 111 | 111 | ||
| 112 | 112 | To typecheck, run: `mypy -p git` | |
| 113 | 113 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,10 +3,7 @@ mypy | |||
| 3 | 3 | ||
| 4 | 4 | black | |
| 5 | 5 | ||
| 6 | - flake8 | ||
| 7 | - flake8-bugbear | ||
| 8 | - flake8-comprehensions | ||
| 9 | - flake8-typing-imports | ||
| 6 | + pre-commit | ||
| 10 | 7 | ||
| 11 | 8 | virtualenv | |
| 12 | 9 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments