Skip to content

Commit

Permalink
add ci pipeline yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Horlawhumy-dev authored Jul 1, 2024
1 parent 5ec8338 commit 7a17e15
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI Pipeline

on:
push:
branches: [ "main", "development" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.8, 3.9]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Create .env file
run: |
echo "SECRET_KEY=qp6_snqe9&ztum3lju!pj8%aau&xgm@coid4px5bvhi65w0&s$" >> .env
echo "DEBUG=True" >> .env
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Tests
run: |
# Export environment variables safely using envsubst
export $(grep -v '^#' .env | xargs -d '\n')
pytest
env:
ENV_FILE_PATH: .env

0 comments on commit 7a17e15

Please sign in to comment.