mirror of
https://github.com/j93es/oauth-backend.git
synced 2026-06-04 08:11:52 +09:00
47 lines
1.3 KiB
YAML
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 --cacert ~/.mitmproxy/mitmproxy-ca-cert.pem -x http://localhost:11080 https://github.com/login/oauth/authorize?client_id=Ov23lixietSCQOHxPvcr&redirect_uri=http%3A%2F%2Flocalhost%3A8787&scope=read%3Auser+user%3Aemail&skip_account_picker=true --silent
|
|
|
|
# Clean up
|
|
kill $APP_PID
|