Transfer API & Tests were added. #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Pipeline | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:16 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: solo6755 | |
POSTGRES_DB: postgres | |
ports: | |
- 5433:5432 # Expose PostgreSQL on the port you're using | |
options: >- | |
--health-cmd "pg_isready -U postgres" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
env: | |
DATABASE_URL: postgres://postgres:solo6755@postgres:5432/postgres # replace with demo postgres using sqlite or something like a mock | |
SECRET_KEY: ${{ secrets.SECRET_KEY }} | |
FERNET_KEY: ${{ secrets.FERNET_KEY }} | |
FORCE_JAVASCRIPT_ACTIONS_TO_NODE20: 'true' | |
steps: | |
# Checkout the code from the repository | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
# Set up Python environment | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
# Install docker-compose | |
- name: Install docker-compose | |
run: | | |
python -m venv venv | |
sudo apt-get update | |
sudo apt-get install -y docker-compose | |
# Install dependencies | |
- name: Install dependencies | |
run: | | |
source venv/bin/activate | |
pip install -r requirements.txt | |
- name: Lint with Flake8 | |
run: | | |
source venv/bin/activate | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
- name: Run Tests | |
run: | | |
source venv/bin/activate | |
python test_app.py |