-
-
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.
- Loading branch information
0 parents
commit aa1612f
Showing
38 changed files
with
2,467 additions
and
0 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 @@ | ||
github: hbakri |
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,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
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,39 @@ | ||
name: coverage | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
run-tests-and-coverage: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install poetry | ||
poetry install --no-root | ||
- name: Run tests with coverage | ||
env: | ||
DJANGO_SETTINGS_MODULE: tests.test_settings | ||
run: | | ||
poetry run coverage run -m django test | ||
poetry run coverage report | ||
poetry run coverage xml | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v4 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
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,57 @@ | ||
name: github-wiki-docs | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version to generate documentation for' | ||
required: true | ||
|
||
jobs: | ||
build-and-publish-github-wiki-docs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install poetry | ||
poetry install --no-root | ||
- name: Generate documentation | ||
run: | | ||
poetry run python docs/scripts/convert_docstrings_to_markdown.py | ||
- name: Clone wiki repository | ||
env: | ||
GH_REPOSITORY: ${{ github.repository }} | ||
run: | | ||
git clone https://github.com/${GH_REPOSITORY}.wiki.git wiki | ||
- name: Remove old markdown files | ||
run: | | ||
find wiki -name '*.md' -exec rm -f {} + | ||
- name: Copy new markdown files | ||
run: | | ||
find docs -name '*.md' -exec cp --parents \{\} wiki/ \; | ||
- name: Commit and push changes | ||
env: | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
GH_REPOSITORY: ${{ github.repository }} | ||
run: | | ||
cd wiki | ||
git config user.name "GitHub Actions" | ||
git config user.email "actions@users.noreply.github.com" | ||
git add . | ||
git commit -m "${{ inputs.version }}" || exit 0 | ||
git push "https://${GH_TOKEN}@github.com/${GH_REPOSITORY}.wiki.git" || exit 0 |
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,40 @@ | ||
name: publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- v[0-9]+.[0-9]+.[0-9]+* | ||
|
||
jobs: | ||
build-and-publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install poetry | ||
poetry install --no-root | ||
- name: Run tests with coverage | ||
env: | ||
DJANGO_SETTINGS_MODULE: tests.test_settings | ||
run: | | ||
poetry run coverage run -m django test | ||
poetry run coverage report --fail-under=100 | ||
- name: Build and publish | ||
env: | ||
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | ||
run: | | ||
poetry config pypi-token.pypi $PYPI_TOKEN | ||
poetry publish --build |
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,40 @@ | ||
name: readmeio-docs | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version to generate documentation for' | ||
required: true | ||
|
||
jobs: | ||
build-and-publish-readmeio-docs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install poetry | ||
poetry install --no-root | ||
- name: Generate documentation | ||
run: | | ||
poetry run python docs/scripts/convert_docstrings_to_markdown.py | ||
- name: Apply readme.io metadata to markdown files | ||
run: | | ||
poetry run python docs/scripts/apply_metadata_to_markdown.py | ||
- name: Publish documentation to readme.io | ||
uses: readmeio/rdme@v8 | ||
with: | ||
rdme: docs ./docs --key=${{ secrets.README_TOKEN }} --version=${{ inputs.version }} |
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,50 @@ | ||
name: tests | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
run-tests-across-versions: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | ||
django-version: ['3.2.*', '4.1.*', '4.2.*', '5.0.*'] | ||
pydantic-version: ['2.5.*', '2.6.*', '2.7.*'] | ||
exclude: | ||
- python-version: '3.11' | ||
django-version: '3.2.*' | ||
- python-version: '3.8' | ||
django-version: '5.0.*' | ||
- python-version: '3.9' | ||
django-version: '5.0.*' | ||
- python-version: '3.12' | ||
django-version: '3.2.*' | ||
- python-version: '3.12' | ||
django-version: '4.1.*' | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install coverage | ||
pip install django==${{ matrix.django-version }} | ||
pip install pydantic==${{ matrix.pydantic-version }} | ||
- name: Run tests with coverage | ||
env: | ||
DJANGO_SETTINGS_MODULE: tests.test_settings | ||
run: | | ||
python -m coverage run -m django test | ||
python -m coverage report --fail-under=100 |
Oops, something went wrong.