forked from litestar-org/litestar
-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (52 loc) · 1.63 KB
/
publish.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Latest Release
on:
release:
types: [published]
jobs:
test_minimal_app:
name: Test Minimal Application with Base Dependencies
runs-on: ubuntu-latest
env:
python_version: "3.11"
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Install App Dependencies
run: poetry install --no-interaction --only main
- name: Install Test Dependencies
run: poetry run python -m pip install pytest pytest-asyncio httpx trio time-machine
- name: Set pythonpath
run: echo "PYTHONPATH=$PWD" >> $GITHUB_ENV
- name: Test
run: mv tests/examples/test_hello_world.py test_hello_world.py && poetry run pytest test_hello_world.py
publish-release:
# needs:
# - test_minimal_app
if: always()
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: poetry install --no-interaction --no-root --no-dev
- name: publish
shell: bash
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish --build --no-interaction