This repository has been archived by the owner on Jun 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: setup pre-commit.ci for running type checking, linting and format…
…ting (#52) ci: setup codecov ci: remove redundant parameter from dependabot config ci: remove redundant parameters from release-please config ci: fix installing poetry on windows ci: use immutable references to repositories in github workflows build: use third-party pre-commit hooks instead of local where possible
- Loading branch information
LeeeeT
authored
Nov 9, 2022
1 parent
a12f86f
commit 8d48195
Showing
16 changed files
with
112 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
handleGHRelease: true | ||
releaseType: python | ||
packageName: valtypes |
This file was deleted.
Oops, something went wrong.
13 changes: 6 additions & 7 deletions
13
.github/workflows/cd.yaml → .github/workflows/publish-release.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
types: [opened, synchronize] | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
defaults: | ||
run: | ||
shell: bash | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest, windows-latest, macos-latest ] | ||
python-version: [ '3.11' ] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- uses: snok/[email protected] | ||
with: | ||
virtualenvs-create: false | ||
- run: poetry install | ||
- run: pre-commit run --all-files pytest || true | ||
- uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
fail_ci_if_error: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,61 @@ | ||
repos: | ||
- repo: local | ||
ci: | ||
autofix_commit_msg: 'refactor: auto fixes from pre-commit hooks' | ||
autoupdate_commit_msg: 'build(deps): update pre-commit hooks' | ||
skip: [pytest] # tests are run in a GitHub workflow | ||
|
||
repos: | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
name: isort | ||
entry: isort | ||
language: python | ||
pass_filenames: false | ||
args: [ . ] | ||
stages: [ commit ] | ||
|
||
- repo: https://github.com/aio-libs/sort-all | ||
rev: v1.2.0 | ||
hooks: | ||
- id: sort-all | ||
name: sort-all | ||
entry: sort-all | ||
language: python | ||
types: [ python ] | ||
stages: [ commit ] | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 22.10.0 | ||
hooks: | ||
- id: black | ||
name: black | ||
entry: black | ||
language: python | ||
pass_filenames: false | ||
args: [ . ] | ||
stages: [ commit ] | ||
|
||
- id: flake8 | ||
- repo: https://github.com/csachs/pyproject-flake8 | ||
rev: 0b61f25 | ||
hooks: | ||
- id: pyproject-flake8 | ||
name: flake8 | ||
entry: pflake8 | ||
language: python | ||
pass_filenames: false | ||
args: [ valtypes, tests ] | ||
stages: [ commit ] | ||
|
||
- repo: local | ||
hooks: | ||
- id: mypy | ||
name: mypy | ||
entry: mypy | ||
language: python | ||
entry: python scripts/mypy.py | ||
language: system | ||
pass_filenames: false | ||
stages: [ commit ] | ||
|
||
- id: pyright | ||
name: pyright | ||
entry: pyright | ||
language: node | ||
entry: python scripts/pyright.py | ||
language: system | ||
pass_filenames: false | ||
stages: [ commit ] | ||
|
||
- id: pyright-verify | ||
name: pyright verify | ||
entry: pyright | ||
language: node | ||
name: pyright-verify | ||
entry: python scripts/pyright-verify.py | ||
language: system | ||
pass_filenames: false | ||
args: [ --verifytypes, valtypes ] | ||
stages: [ commit ] | ||
|
||
- id: pytest | ||
name: pytest | ||
entry: pytest | ||
language: python | ||
entry: python scripts/pytest.py | ||
language: system | ||
pass_filenames: false | ||
stages: [ commit ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
coverage: | ||
status: | ||
project: | ||
default: | ||
target: 100% | ||
|
||
comment: | ||
layout: "header, diff, footer" | ||
require_changes: true | ||
after_n_builds: 3 # keep in sync with .github/workflows/test.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import os | ||
|
||
os.system("pip install mypy pytest") | ||
os.system("mypy") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import os | ||
|
||
os.system("pip install pyright") | ||
os.system("pyright --verifytypes valtypes") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import os | ||
|
||
os.system("pip install pyright pytest") | ||
os.system("pyright") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import os | ||
|
||
os.system("pip install pytest pytest-cov") | ||
os.system("pytest") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.