Skip to content

Commit

Permalink
added workflow for run test in actions
Browse files Browse the repository at this point in the history
  • Loading branch information
MrIkso authored Aug 11, 2024
1 parent b320561 commit 7a7e98b
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/run-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Run Test

on:
push:
pull_request:
workflow_dispatch:

jobs:
tests:
name: Test
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_DB: postgres
POSTGRES_PASSWORD: password
POSTGRES_USER: user
ports:
- 5432:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout git repository
uses: actions/checkout@v4

- name: Setup python
uses: actions/setup-python@v2
with:
python-version: '3.12'

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Install dependencies
run: poetry install --no-interaction --no-root

- name: Copy settings.toml for configuration test database
run: cp docs/settings.example.toml settings.toml

- name: Run tests
run: poetry run pytest

0 comments on commit 7a7e98b

Please sign in to comment.