Skip to content

Commit 68b414a

Browse files
committed
2 parents c1b290b + ddbf55b commit 68b414a

File tree

3 files changed

+78
-0
lines changed

3 files changed

+78
-0
lines changed

.github/workflows/docs.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: ci
2+
on:
3+
push:
4+
branches:
5+
- main
6+
permissions:
7+
contents: write
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
if:
12+
startsWith(github.ref, 'refs/tags')
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-python@v4
16+
with:
17+
python-version: 3.x
18+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
19+
- uses: actions/cache@v3
20+
with:
21+
key: mkdocs-material-${{ env.cache_id }}
22+
path: .cache
23+
restore-keys: |
24+
mkdocs-material-
25+
- run: |
26+
pip install poetry
27+
poetry install --with docs
28+
poetry run mkdocs gh-deploy --force

.github/workflows/pypi.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Build and publish Python 🐍 distributions 📦 to PyPI
2+
3+
on: push
4+
5+
jobs:
6+
build-n-publish:
7+
name: Build and publish Python 🐍 distributions 📦 to PyPI
8+
runs-on: ubuntu-latest
9+
if:
10+
startsWith(github.ref, 'refs/tags')
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Set up Python
14+
uses: actions/setup-python@v4
15+
with:
16+
python-version: "3.x"
17+
- name: Set up poetry
18+
run: |
19+
pip install poetry==1.5.1
20+
- name: Build package
21+
run: |
22+
poetry build
23+
- name: Publish distribution 📦 to PyPI
24+
uses: pypa/gh-action-pypi-publish@release/v1
25+
with:
26+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/test.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Linux Testing
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ['3.9', '3.10', '3.11', '3.12']
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Install dependencies
18+
shell: "bash -l {0}"
19+
run: |
20+
pip install poetry
21+
poetry install
22+
- name: Test
23+
run: |
24+
poetry run pytest

0 commit comments

Comments
 (0)