-
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.
Merge pull request #4 from baluyotraf/feature/ci
Setup github actions
- Loading branch information
Showing
5 changed files
with
107 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: qa | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
lint-format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.9" | ||
- uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/pre-commit | ||
key: | ||
pre-commit-3|${{ env.pythonLocation }}|${{ | ||
hashFiles('.pre-commit-config.yaml') }} | ||
- uses: abatilo/actions-poetry@v2 | ||
- run: python -m pip install pre-commit | ||
- run: poetry install | ||
- run: | ||
poetry run pre-commit run --show-diff-on-failure --color=always --all | ||
test: | ||
needs: lint-format | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
- windows-latest | ||
python_version: ["3.9", "3.10", "3.11", "3.12"] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python_version }} | ||
- uses: abatilo/actions-poetry@v2 | ||
- run: python -m pip install tox-gh>=1.2 | ||
- run: poetry install --no-root && poetry run tox |
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,31 @@ | ||
name: qa | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.9" | ||
- uses: abatilo/actions-poetry@v2 | ||
- run: git fetch origin gh-pages --depth=1 | ||
- run: poetry install --with docs | ||
- run: poetry run mike deploy ${{ github.ref_name }} stable | ||
|
||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python_version }} | ||
- uses: abatilo/actions-poetry@v2 | ||
- run: poetry build | ||
- run: poetry publish --dry-run | ||
- run: poetry publish |
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,28 +1,29 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.3.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: "v3.1.0" | ||
hooks: | ||
- id: prettier | ||
args: [--prose-wrap, always] | ||
types_or: [ markdown ] | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: "v3.1.0" | ||
hooks: | ||
- id: prettier | ||
args: [--prose-wrap, always] | ||
types_or: [markdown, yaml] | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.3.3 | ||
hooks: | ||
- id: ruff | ||
args: [ --fix ] | ||
- id: ruff-format | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.3.3 | ||
hooks: | ||
- id: ruff | ||
args: [--fix] | ||
- id: ruff-format | ||
|
||
- repo: https://github.com/RobertCraigie/pyright-python | ||
rev: v1.1.354 | ||
hooks: | ||
- id: pyright | ||
language: system | ||
types: [python] | ||
- repo: local | ||
hooks: | ||
- id: pyright | ||
name: pyright | ||
entry: pyright | ||
language: system | ||
types: [python] |
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 |
---|---|---|
|
@@ -21,7 +21,6 @@ plugins: | |
- search | ||
- social | ||
|
||
|
||
markdown_extensions: | ||
- pymdownx.superfences | ||
- pymdownx.highlight: | ||
|
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