βοΈ [refactor][frontend] Query events by start/end instead of event_date #374
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
| name: "π CI Pipeline" | |
| on: | |
| push: | |
| branches: | |
| - "develop" | |
| paths: | |
| - ".github/**" | |
| - "backend/kayman/**" | |
| - "backend/pyproject.toml" | |
| - "backend/uv.lock" | |
| - "frontend/**" | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| backend-test: | |
| name: "π§ͺ Backend Testing" | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: "backend" | |
| steps: | |
| - name: "π Checkout" | |
| uses: actions/checkout@v7 | |
| - name: "π Install uv" | |
| uses: astral-sh/setup-uv@v7 | |
| - name: "π Set up Python" | |
| uses: actions/setup-python@v7 | |
| with: | |
| python-version-file: "backend/pyproject.toml" | |
| - name: "π§ͺ Testing" | |
| run: | | |
| scripts/test/backend.sh | |
| - name: "π Report coverage" | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| fail_ci_if_error: true | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| backend-lint: | |
| name: "π Backend Linting" | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: "backend" | |
| steps: | |
| - name: "π Checkout" | |
| uses: actions/checkout@v7 | |
| - name: "π Install uv" | |
| uses: astral-sh/setup-uv@v7 | |
| - name: "π Set up Python" | |
| uses: actions/setup-python@v7 | |
| with: | |
| python-version-file: "backend/pyproject.toml" | |
| - name: "π Linting" | |
| run: | | |
| scripts/lint/backend.sh | |
| build-openapi-schema: | |
| name: "π Build OpenAPI Schema" | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: "backend" | |
| steps: | |
| - name: "π Checkout" | |
| uses: actions/checkout@v7 | |
| - name: "π Install uv" | |
| uses: astral-sh/setup-uv@v7 | |
| - name: "π Set up Python" | |
| uses: actions/setup-python@v7 | |
| with: | |
| python-version-file: "backend/pyproject.toml" | |
| - name: "π Generate OpenAPI Schema" | |
| run: | | |
| scripts/build/openapi-spec.sh openapi.json | |
| - name: "β¬οΈ Upload artifact" | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: openapi-schema | |
| path: backend/openapi.json | |
| frontend-lint: | |
| name: "π Frontend Linting" | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: "frontend" | |
| needs: [build-openapi-schema] | |
| steps: | |
| - name: "π Checkout" | |
| uses: actions/checkout@v7 | |
| - name: "β¬οΈ Download artifact" | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: openapi-schema | |
| path: /tmp | |
| - name: "βοΈ Setup pnpm" | |
| uses: pnpm/action-setup@v6 | |
| with: | |
| package_json_file: "frontend/package.json" | |
| run_install: false | |
| - name: "βοΈ Setup Node.js" | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version-file: "frontend/package.json" | |
| cache: "pnpm" | |
| cache-dependency-path: "frontend/pnpm-lock.yaml" | |
| - name: "π Setup mise" | |
| uses: jdx/mise-action@v4 | |
| - name: "π¦ Install dependencies" | |
| run: pnpm install --frozen-lockfile | |
| - name: "π Linting" | |
| run: pnpm lint | |
| license: | |
| name: "πͺͺ License Scan" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "π Checkout" | |
| uses: actions/checkout@v7 | |
| # FOSSA's API Key are meant to be exposed as to doc | |
| - name: "πͺͺ License Scan" | |
| uses: fossas/fossa-action@main | |
| with: | |
| api-key: 2d7865a44aa575d857521faaee1a57f8 | |
| build-image: | |
| name: "π³ Build Docker Image" | |
| runs-on: ubuntu-latest | |
| needs: [backend-test, backend-lint, frontend-lint, license] | |
| if: success() && github.ref == 'refs/heads/develop' | |
| steps: | |
| - name: "π Checkout" | |
| uses: actions/checkout@v7 | |
| - name: "βοΈ Setup Docker Meta" | |
| id: meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| images: | | |
| ${{ github.repository }} | |
| ghcr.io/${{ github.repository }} | |
| tags: | | |
| type=edge | |
| labels: | | |
| org.opencontainers.image.title=kayman | |
| org.opencontainers.image.documentation=${{ github.repository }}/wiki | |
| org.opencontainers.image.authors=tomy0000000 | |
| - name: "π Build and Push Image" | |
| uses: tomy0000000/actions/build-push-image@main | |
| with: | |
| docker_password: ${{ secrets.DOCKER_PASSWORD }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} |