Spaces:
Sleeping
Sleeping
| name: PayShield CI | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| jobs: | |
| lint-and-test: | |
| runs-on: ubuntu-latest | |
| services: | |
| redis: | |
| image: redis:7-alpine | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| version: "latest" | |
| enable-cache: true | |
| - name: Set up Python | |
| run: uv python install | |
| - name: Install the project | |
| run: uv sync --all-extras --dev | |
| - name: Run Ruff (Linter) | |
| run: uv run ruff check . | |
| - name: Run Ruff (Formatter check) | |
| run: uv run ruff format --check . | |
| - name: Run tests with coverage | |
| run: uv run pytest --cov=src tests/ | |
| env: | |
| REDIS_HOST: localhost | |
| REDIS_PORT: 6379 | |