add: MIT License to the project #2
This file contains hidden or 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
| # Required GitHub Secrets: | |
| # CF_ACCOUNT_ID - Cloudflare Account ID (found in dashboard) | |
| # CF_API_TOKEN - Cloudflare API Token with Workers permissions | |
| # (Create at: https://dash.cloudflare.com/profile/api-tokens) | |
| name: Deploy to Cloudflare Workers | |
| on: | |
| push: | |
| branches: [main] | |
| jobs: | |
| test-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Set up Python | |
| run: uv python install 3.13 | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Run tests | |
| run: uv run pytest --cov=src --cov-report=term-missing --cov-fail-under=80 | |
| - name: Deploy to Cloudflare Workers | |
| run: uv run pywrangler deploy | |
| env: | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} |