Skip to content

Update deploy_docs.yml #201

Update deploy_docs.yml

Update deploy_docs.yml #201

Workflow file for this run

name: publish package
on:
workflow_dispatch:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14.3-alpine
env:
POSTGRES_DB: postgres
POSTGRES_PORT: 5432
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- '127.0.0.1:5432:5432'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: actions/cache@v3
id: cache-venv
with:
path: |
~/.local
.venv
key: ${{ hashFiles('**/poetry.lock') }}-${{ steps.setup-python.outputs.python-version }}-1
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: false
version: 1.5.0
- run: |
python -m venv .venv --upgrade-deps
source .venv/bin/activate
poetry install --no-interaction --all-extras
if: steps.cache-venv.outputs.cache-hit != 'true'
- name: Run tests
env:
PSQL_DATABASE_TEST: postgresql://postgres:postgres@localhost:5432/postgres
run: |
source .venv/bin/activate
pytest
build-and-publish-py-package:
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: MatsMoll/.github/workflows/publish@patch-1
with:
token: ${{ secrets.PYPI_TOKEN }}
python-version: '3.10.9'