diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 946f235..cd972a0 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -5,8 +5,12 @@ updates:
directory: "/"
schedule:
interval: "daily"
+ commit-message:
+ prefix: ⬆
# Python
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
+ commit-message:
+ prefix: ⬆
diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml
index 18e35b3..0d92d1f 100644
--- a/.github/workflows/build-docs.yml
+++ b/.github/workflows/build-docs.yml
@@ -19,9 +19,9 @@ jobs:
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3.1.0
- name: Set up Python
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
with:
python-version: "3.7"
# Allow debugging with tmate
@@ -30,7 +30,7 @@ jobs:
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
with:
limit-access-to-actor: true
- - uses: actions/cache@v2
+ - uses: actions/cache@v3
id: cache
with:
path: ${{ env.pythonLocation }}
@@ -53,7 +53,7 @@ jobs:
- name: Install Material for MkDocs Insiders
if: github.event.pull_request.head.repo.fork == false && steps.cache.outputs.cache-hit != 'true'
run: python -m poetry run pip install git+https://${{ secrets.ACTIONS_TOKEN }}@github.com/squidfunk/mkdocs-material-insiders.git
- - uses: actions/cache@v2
+ - uses: actions/cache@v3
with:
key: mkdocs-cards-${{ github.ref }}
path: .cache
@@ -65,7 +65,7 @@ jobs:
run: python -m poetry run mkdocs build --config-file mkdocs.insiders.yml
- name: Zip docs
run: python -m poetry run bash ./scripts/zip-docs.sh
- - uses: actions/upload-artifact@v2
+ - uses: actions/upload-artifact@v3
with:
name: docs-zip
path: ./docs.zip
diff --git a/.github/workflows/latest-changes.yml b/.github/workflows/latest-changes.yml
index 48fb6dc..9c3edcc 100644
--- a/.github/workflows/latest-changes.yml
+++ b/.github/workflows/latest-changes.yml
@@ -20,7 +20,7 @@ jobs:
latest-changes:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3.1.0
with:
# To allow latest-changes to commit to the main branch
token: ${{ secrets.ACTIONS_TOKEN }}
diff --git a/.github/workflows/preview-docs.yml b/.github/workflows/preview-docs.yml
index e335e81..10e4432 100644
--- a/.github/workflows/preview-docs.yml
+++ b/.github/workflows/preview-docs.yml
@@ -10,9 +10,9 @@ jobs:
preview-docs:
runs-on: ubuntu-20.04
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3.1.0
- name: Download Artifact Docs
- uses: dawidd6/action-download-artifact@v2.9.0
+ uses: dawidd6/action-download-artifact@v2.24.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
workflow: build-docs.yml
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 105dbdd..f3c1e98 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -15,9 +15,9 @@ jobs:
publish:
runs-on: ubuntu-20.04
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3.1.0
- name: Set up Python
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
with:
python-version: "3.7"
# Allow debugging with tmate
@@ -26,7 +26,7 @@ jobs:
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
with:
limit-access-to-actor: true
- - uses: actions/cache@v2
+ - uses: actions/cache@v3
id: cache
with:
path: ${{ env.pythonLocation }}
diff --git a/.github/workflows/smokeshow.yml b/.github/workflows/smokeshow.yml
new file mode 100644
index 0000000..7ee17ca
--- /dev/null
+++ b/.github/workflows/smokeshow.yml
@@ -0,0 +1,35 @@
+name: Smokeshow
+
+on:
+ workflow_run:
+ workflows: [Test]
+ types: [completed]
+
+permissions:
+ statuses: write
+
+jobs:
+ smokeshow:
+ if: ${{ github.event.workflow_run.conclusion == 'success' }}
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/setup-python@v4
+ with:
+ python-version: '3.9'
+
+ - run: pip install smokeshow
+
+ - uses: dawidd6/action-download-artifact@v2.24.2
+ with:
+ workflow: test.yml
+ commit: ${{ github.event.workflow_run.head_sha }}
+
+ - run: smokeshow upload coverage-html
+ env:
+ SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage}
+ SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 95
+ SMOKESHOW_GITHUB_CONTEXT: coverage
+ SMOKESHOW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ SMOKESHOW_GITHUB_PR_HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
+ SMOKESHOW_AUTH_KEY: ${{ secrets.SMOKESHOW_AUTH_KEY }}
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 0d32926..585ffc0 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -22,9 +22,9 @@ jobs:
fail-fast: false
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3.1.0
- name: Set up Python
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# Allow debugging with tmate
@@ -33,7 +33,7 @@ jobs:
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
with:
limit-access-to-actor: true
- - uses: actions/cache@v2
+ - uses: actions/cache@v3
id: cache
with:
path: ${{ env.pythonLocation }}
@@ -56,7 +56,43 @@ jobs:
- name: Lint
if: ${{ matrix.python-version != '3.6.15' }}
run: python -m poetry run bash scripts/lint.sh
+ - run: mkdir coverage
- name: Test
run: python -m poetry run bash scripts/test.sh
- - name: Upload coverage
- uses: codecov/codecov-action@v2
+ env:
+ COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}
+ CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}
+ - name: Store coverage files
+ uses: actions/upload-artifact@v3
+ with:
+ name: coverage
+ path: coverage
+ coverage-combine:
+ needs: [test]
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+
+ - uses: actions/setup-python@v4
+ with:
+ python-version: '3.8'
+
+ - name: Get coverage files
+ uses: actions/download-artifact@v3
+ with:
+ name: coverage
+ path: coverage
+
+ - run: pip install coverage[toml]
+
+ - run: ls -la coverage
+ - run: coverage combine coverage
+ - run: coverage report
+ - run: coverage html --show-contexts --title "Coverage for ${{ github.sha }}"
+
+ - name: Store coverage HTML
+ uses: actions/upload-artifact@v3
+ with:
+ name: coverage-html
+ path: htmlcov
diff --git a/README.md b/README.md
index 5a63c9d..5721f1c 100644
--- a/README.md
+++ b/README.md
@@ -11,9 +11,8 @@
-
-
-
+
+
diff --git a/docs/db-to-code.md b/docs/db-to-code.md
index ce9ffac..2e0fb1b 100644
--- a/docs/db-to-code.md
+++ b/docs/db-to-code.md
@@ -62,7 +62,7 @@ The user is probably, in some way, telling your application:
2
```
-And the would be this table (with a single row):
+And the result would be this table (with a single row):