Skip to content

Commit

Permalink
added ci.yml for pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
hemant10yadav committed Jan 6, 2025
1 parent 2ce830d commit 4a81c47
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

# Enable Buildkit and let compose use it to speed up image building
env:
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1

on:
pull_request:
branches: ['main']

push:
branches: ['main']

concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
pytest:
runs-on: ubuntu-latest

services:
postgres:
image: postgres:12
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres

env:
DATABASE_URL: 'postgres://postgres:postgres@localhost:5432/postgres'

steps:
- name: Checkout Code Repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: pip
cache-dependency-path: requirements-dev.txt

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Test with pytest
run: pytest

0 comments on commit 4a81c47

Please sign in to comment.