Skip to content

Commit

Permalink
release: 🔖 v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hbakri committed May 12, 2024
0 parents commit aa1612f
Show file tree
Hide file tree
Showing 38 changed files with 2,467 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: hbakri
6 changes: 6 additions & 0 deletions .github/dependabot.yml
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"
39 changes: 39 additions & 0 deletions .github/workflows/coverage.yml
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 }}
57 changes: 57 additions & 0 deletions .github/workflows/github-wiki-docs.yml
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
40 changes: 40 additions & 0 deletions .github/workflows/publish.yml
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
40 changes: 40 additions & 0 deletions .github/workflows/readmeio-docs.yml
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 }}
50 changes: 50 additions & 0 deletions .github/workflows/tests.yml
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
Loading

0 comments on commit aa1612f

Please sign in to comment.