oauth-backend/.github/workflows/ci.yml

47 lines
1.3 KiB
YAML

name: CI/CD Pipeline
on:
push:
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.13]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync
- name: Set up environment variables
run: |
echo "GOOGLE_ID=bot.imnya.ng@gmail.com" > .env
- name: Start application and run proxy test
run: |
# Start the application in background
uv run main.py &
APP_PID=$!
# Wait for application to start
sleep 5
# Test proxy functionality
curl -k -x https://localhost:11080 "https://github.com/login?client_id=Ov23lixietSCQOHxPvcr&return_to=%2Flogin%2Foauth%2Fauthorize%3Fclient_id%3DOv23lixietSCQOHxPvcr%26redirect_uri%3Dhttp%253A%252F%252Flocalhost%253A8787%26scope%3Dread%253Auser%2Buser%253Aemail%26skip_account_picker%3Dtrue"
# Clean up
kill $APP_PID