Add Phase 1 CI/CD pipeline with basic checks (linting and testing) #13
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 | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| ci: | |
| name: Basic Checks | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install Encore CLI | |
| run: | | |
| curl -L https://encore.dev/install.sh | bash | |
| echo "$HOME/.encore/bin" >> $GITHUB_PATH | |
| - name: Install backend dependencies | |
| working-directory: ./backend | |
| run: bun install | |
| - name: Lint backend | |
| working-directory: ./backend | |
| run: bun run lint | |
| - name: Test backend | |
| working-directory: ./backend | |
| run: encore test | |
| - name: Install frontend dependencies | |
| working-directory: ./frontend | |
| run: bun install | |
| - name: Lint frontend | |
| working-directory: ./frontend | |
| run: bun run lint | |
| - name: Check frontend types | |
| working-directory: ./frontend | |
| run: bun run check |