Skip to content

Commit

Permalink
ci: set GitHub Actions for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ayharano committed Jan 16, 2024
1 parent 04113d7 commit e2657fc
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/test_pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Pipeline
on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest

env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}

services:
postgres:
image: postgres
env:
POSTGRES_DB: test_db
POSTGRES_PASSWORD: test_pw
POSTGRES_USER: test
ports:
- 5432:5432

steps:
- name: Checkout repo files
uses: actions/checkout@v4

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.12.1'

- name: Install Python package build/install dependencies
run: pip install --upgrade pip build setuptools

- name: Install test packages
run: pip install -e '.[test]'

- name: Run tests
run: pytest --cov=src . -vv

0 comments on commit e2657fc

Please sign in to comment.