Skip to content

Commit b160fc8

Browse files
authored
Merge branch 'main' into docs/created_updated_at_cols
2 parents d78fc71 + 7b3148c commit b160fc8

18 files changed

+143
-46
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ updates:
55
directory: "/"
66
schedule:
77
interval: "daily"
8+
commit-message:
9+
prefix:
810
# Python
911
- package-ecosystem: "pip"
1012
directory: "/"
1113
schedule:
1214
interval: "daily"
15+
commit-message:
16+
prefix:

.github/workflows/build-docs.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
env:
2020
GITHUB_CONTEXT: ${{ toJson(github) }}
2121
run: echo "$GITHUB_CONTEXT"
22-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v3.1.0
2323
- name: Set up Python
24-
uses: actions/setup-python@v2
24+
uses: actions/setup-python@v4
2525
with:
2626
python-version: "3.7"
2727
# Allow debugging with tmate
@@ -30,7 +30,7 @@ jobs:
3030
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
3131
with:
3232
limit-access-to-actor: true
33-
- uses: actions/cache@v2
33+
- uses: actions/cache@v3
3434
id: cache
3535
with:
3636
path: ${{ env.pythonLocation }}
@@ -53,7 +53,7 @@ jobs:
5353
- name: Install Material for MkDocs Insiders
5454
if: github.event.pull_request.head.repo.fork == false && steps.cache.outputs.cache-hit != 'true'
5555
run: python -m poetry run pip install git+https://${{ secrets.ACTIONS_TOKEN }}@github.com/squidfunk/mkdocs-material-insiders.git
56-
- uses: actions/cache@v2
56+
- uses: actions/cache@v3
5757
with:
5858
key: mkdocs-cards-${{ github.ref }}
5959
path: .cache
@@ -65,10 +65,10 @@ jobs:
6565
run: python -m poetry run mkdocs build --config-file mkdocs.insiders.yml
6666
- name: Zip docs
6767
run: python -m poetry run bash ./scripts/zip-docs.sh
68-
- uses: actions/upload-artifact@v2
68+
- uses: actions/upload-artifact@v3
6969
with:
7070
name: docs-zip
71-
path: ./docs.zip
71+
path: ./site/docs.zip
7272
- name: Deploy to Netlify
7373
uses: nwtgck/[email protected]
7474
with:

.github/workflows/latest-changes.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
latest-changes:
2121
runs-on: ubuntu-latest
2222
steps:
23-
- uses: actions/checkout@v2
23+
- uses: actions/checkout@v3.1.0
2424
with:
2525
# To allow latest-changes to commit to the main branch
2626
token: ${{ secrets.ACTIONS_TOKEN }}

.github/workflows/preview-docs.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,22 @@ jobs:
1010
preview-docs:
1111
runs-on: ubuntu-20.04
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/[email protected]
14+
- name: Clean site
15+
run: |
16+
rm -rf ./site
17+
mkdir ./site
1418
- name: Download Artifact Docs
15-
uses: dawidd6/action-download-artifact@v2.9.0
19+
uses: dawidd6/action-download-artifact@v2.24.2
1620
with:
1721
github_token: ${{ secrets.GITHUB_TOKEN }}
1822
workflow: build-docs.yml
1923
run_id: ${{ github.event.workflow_run.id }}
2024
name: docs-zip
25+
path: ./site/
2126
- name: Unzip docs
2227
run: |
23-
rm -rf ./site
28+
cd ./site
2429
unzip docs.zip
2530
rm -f docs.zip
2631
- name: Deploy to Netlify

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515
publish:
1616
runs-on: ubuntu-20.04
1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v3.1.0
1919
- name: Set up Python
20-
uses: actions/setup-python@v2
20+
uses: actions/setup-python@v4
2121
with:
2222
python-version: "3.7"
2323
# Allow debugging with tmate
@@ -26,7 +26,7 @@ jobs:
2626
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
2727
with:
2828
limit-access-to-actor: true
29-
- uses: actions/cache@v2
29+
- uses: actions/cache@v3
3030
id: cache
3131
with:
3232
path: ${{ env.pythonLocation }}

.github/workflows/smokeshow.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Smokeshow
2+
3+
on:
4+
workflow_run:
5+
workflows: [Test]
6+
types: [completed]
7+
8+
permissions:
9+
statuses: write
10+
11+
jobs:
12+
smokeshow:
13+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/setup-python@v4
18+
with:
19+
python-version: '3.9'
20+
21+
- run: pip install smokeshow
22+
23+
- uses: dawidd6/[email protected]
24+
with:
25+
workflow: test.yml
26+
commit: ${{ github.event.workflow_run.head_sha }}
27+
28+
- run: smokeshow upload coverage-html
29+
env:
30+
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage}
31+
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 95
32+
SMOKESHOW_GITHUB_CONTEXT: coverage
33+
SMOKESHOW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
SMOKESHOW_GITHUB_PR_HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
35+
SMOKESHOW_AUTH_KEY: ${{ secrets.SMOKESHOW_AUTH_KEY }}

.github/workflows/test.yml

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ jobs:
2222
fail-fast: false
2323

2424
steps:
25-
- uses: actions/checkout@v2
25+
- uses: actions/checkout@v3.1.0
2626
- name: Set up Python
27-
uses: actions/setup-python@v2
27+
uses: actions/setup-python@v4
2828
with:
2929
python-version: ${{ matrix.python-version }}
3030
# Allow debugging with tmate
@@ -33,7 +33,7 @@ jobs:
3333
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
3434
with:
3535
limit-access-to-actor: true
36-
- uses: actions/cache@v2
36+
- uses: actions/cache@v3
3737
id: cache
3838
with:
3939
path: ${{ env.pythonLocation }}
@@ -56,7 +56,43 @@ jobs:
5656
- name: Lint
5757
if: ${{ matrix.python-version != '3.6.15' }}
5858
run: python -m poetry run bash scripts/lint.sh
59+
- run: mkdir coverage
5960
- name: Test
6061
run: python -m poetry run bash scripts/test.sh
61-
- name: Upload coverage
62-
uses: codecov/codecov-action@v2
62+
env:
63+
COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}
64+
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}
65+
- name: Store coverage files
66+
uses: actions/upload-artifact@v3
67+
with:
68+
name: coverage
69+
path: coverage
70+
coverage-combine:
71+
needs: [test]
72+
runs-on: ubuntu-latest
73+
74+
steps:
75+
- uses: actions/checkout@v3
76+
77+
- uses: actions/setup-python@v4
78+
with:
79+
python-version: '3.8'
80+
81+
- name: Get coverage files
82+
uses: actions/download-artifact@v3
83+
with:
84+
name: coverage
85+
path: coverage
86+
87+
- run: pip install coverage[toml]
88+
89+
- run: ls -la coverage
90+
- run: coverage combine coverage
91+
- run: coverage report
92+
- run: coverage html --show-contexts --title "Coverage for ${{ github.sha }}"
93+
94+
- name: Store coverage HTML
95+
uses: actions/upload-artifact@v3
96+
with:
97+
name: coverage-html
98+
path: htmlcov

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@
1111
<a href="https://github.com/tiangolo/sqlmodel/actions?query=workflow%3APublish" target="_blank">
1212
<img src="https://github.com/tiangolo/sqlmodel/workflows/Publish/badge.svg" alt="Publish">
1313
</a>
14-
<a href="https://codecov.io/gh/tiangolo/sqlmodel" target="_blank">
15-
<img src="https://img.shields.io/codecov/c/github/tiangolo/sqlmodel?color=%2334D058" alt="Coverage">
16-
</a>
14+
<a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/tiangolo/sqlmodel" target="_blank">
15+
<img src="https://coverage-badge.samuelcolvin.workers.dev/tiangolo/sqlmodel.svg" alt="Coverage">
1716
<a href="https://pypi.org/project/sqlmodel" target="_blank">
1817
<img src="https://img.shields.io/pypi/v/sqlmodel?color=%2334D058&label=pypi%20package" alt="Package version">
1918
</a>

docs/db-to-code.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ The user is probably, in some way, telling your application:
6262
2
6363
```
6464

65-
And the would be this table (with a single row):
65+
And the result would be this table (with a single row):
6666

6767
<table>
6868
<tr>

docs/index.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@
1111
<a href="https://github.com/tiangolo/sqlmodel/actions?query=workflow%3APublish" target="_blank">
1212
<img src="https://github.com/tiangolo/sqlmodel/workflows/Publish/badge.svg" alt="Publish">
1313
</a>
14-
<a href="https://codecov.io/gh/tiangolo/sqlmodel" target="_blank">
15-
<img src="https://img.shields.io/codecov/c/github/tiangolo/sqlmodel?color=%2334D058" alt="Coverage">
16-
</a>
14+
<a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/tiangolo/sqlmodel" target="_blank">
15+
<img src="https://coverage-badge.samuelcolvin.workers.dev/tiangolo/sqlmodel.svg" alt="Coverage">
1716
<a href="https://pypi.org/project/sqlmodel" target="_blank">
1817
<img src="https://img.shields.io/pypi/v/sqlmodel?color=%2334D058&label=pypi%20package" alt="Package version">
1918
</a>

0 commit comments

Comments
 (0)