Add initial project structure with Docker, CI, and FastAPI setup
CI / lint-test-build (push) Failing after 8m23s
CI / lint-test-build (push) Failing after 8m23s
- Create Dockerfile and docker-compose.yml for containerization - Add CI configuration for linting and testing - Implement FastAPI application with health check routes - Set up database schema using DuckDB - Include environment configuration and secrets management - Add README with project objectives and key features - Implement logging setup and configuration - Create initial tests for health route - Add HTML templates for web interface
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main", "master"]
|
||||
tags: ["v*"]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
lint-test-build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
- name: Install project + dev deps
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -e .[dev]
|
||||
|
||||
- name: Ruff
|
||||
run: ruff check .
|
||||
|
||||
- name: Black
|
||||
run: black --check .
|
||||
|
||||
- name: MyPy
|
||||
run: mypy src
|
||||
|
||||
- name: Tests
|
||||
run: pytest -q
|
||||
|
||||
- name: Login to Gitea registry
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.allucanget.biz
|
||||
username: ${{ secrets.GITEA_REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.GITEA_REGISTRY_TOKEN }}
|
||||
|
||||
- name: Build and push image
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: git.allucanget.biz/${{ secrets.GITEA_REGISTRY_NAMESPACE }}/arbitrade:${{ github.sha }}
|
||||
Reference in New Issue
Block a user