diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..82c641c --- /dev/null +++ b/.github/workflows/ci.yml @@ -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