-
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.
added docs preview and test with poetry
- Loading branch information
1 parent
4dbf9c7
commit cbc26a0
Showing
3 changed files
with
89 additions
and
27 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,41 @@ | ||
name: Deploy PR Docs previews | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- closed | ||
|
||
concurrency: preview-${{ github.ref }} | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: "3.12" | ||
- uses: pre-commit/[email protected] | ||
deploy-preview: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: "3.12" | ||
- name: Setup Poetry | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: 1.8.3 | ||
- name: Install Packages | ||
run: poetry install --with docs,dev | ||
- run: git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com' | ||
- name: Build Docs | ||
run: poetry run mkdocs build | ||
- name: Deploy preview | ||
uses: rossjrw/[email protected] | ||
with: | ||
source-dir: ./site/ |
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 |
---|---|---|
|
@@ -5,23 +5,40 @@ on: | |
- main | ||
workflow_dispatch: | ||
inputs: | ||
name: | ||
description: 'Publish docs' | ||
directory: | ||
description: 'Build docs' | ||
default: 'build it now' | ||
required: false | ||
default: 'I Just wanna publish the docs' | ||
|
||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: "3.12" | ||
- uses: pre-commit/[email protected] | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: "3.12" | ||
- name: Setup Poetry | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: 1.8.3 | ||
- name: Install Packages | ||
run: poetry install --with docs,dev | ||
- run: git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com' | ||
- name: Build Docs | ||
run: poetry run mkdocs build | ||
- name: Deploy 🚀 | ||
uses: JamesIves/[email protected] | ||
with: | ||
python-version: 3.8 | ||
- run: pip install mkdocs | ||
- run: pip install mkdocs-material | ||
- run: pip install mkdocs-material-extensions | ||
- run: pip install mkdocs-autorefs | ||
- run: pip install mkdocstrings | ||
- run: pip install -e ".[all]" | ||
- run: mkdocs gh-deploy --force | ||
folder: site | ||
clean-exclude: pr-preview/ | ||
force: false |
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,10 +1,6 @@ | ||
name: Test Code with Pip | ||
name: Test Code | ||
|
||
on: | ||
push: | ||
branches: | ||
- "**" | ||
- "!gh-pages" | ||
pull_request: | ||
branches: | ||
- main | ||
|
@@ -19,20 +15,28 @@ jobs: | |
build: | ||
strategy: | ||
matrix: | ||
python-version: [3.8, 3.9] | ||
python-version: ["3.10", "3.11", "3.12"] | ||
os: [ubuntu-latest, macos-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4.1.6 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
uses: actions/setup-python@v5.1.0 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install from source (required for the pre-commit tests) | ||
run: pip install ".[all]" | ||
- name: Test with pytest | ||
- name: Setup Poetry | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: 1.8.3 | ||
- name: Install Packages | ||
run: poetry install --with docs,dev | ||
- name: Build coverage file | ||
run: | | ||
pytest --cache-clear --cov=app tests/ > pytest-coverage.txt | ||
- name: Comment coverage | ||
uses: coroo/[email protected] | ||
poetry run pytest --cache-clear --junitxml=pytest.xml --cov=kirsche tests/ > pytest-coverage.txt | ||
- name: Pytest coverage comment | ||
uses: MishaKav/[email protected] | ||
with: | ||
pytest-coverage-path: ./pytest-coverage.txt | ||
junitxml-path: ./pytest.xml | ||
title: Coverage Report (${{ github.event.pull_request.head.sha || github.sha }}, ${{ matrix.python-version }}, ${{ matrix.os }}) |