CI fix, autoformat #44
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: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| backend-checks: | |
| name: Backend (Go) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install mise | |
| uses: jdx/mise-action@v2 | |
| - name: Install tools with mise | |
| run: mise install | |
| - name: Cache Go modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('backend/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Build check tool | |
| run: go build -o check . | |
| working-directory: ./scripts/check | |
| env: | |
| GOTOOLCHAIN: auto | |
| - name: Check gofmt | |
| run: ./scripts/check/check --check gofmt --ci | |
| - name: Check go mod tidy | |
| run: ./scripts/check/check --check go-mod-tidy --ci | |
| - name: Run govulncheck | |
| run: ./scripts/check/check --check govulncheck --ci | |
| - name: Run go vet | |
| run: ./scripts/check/check --check go-vet --ci | |
| - name: Run staticcheck | |
| run: ./scripts/check/check --check staticcheck --ci | |
| - name: Run ineffassign | |
| run: ./scripts/check/check --check ineffassign --ci | |
| - name: Run misspell | |
| run: ./scripts/check/check --check misspell --ci | |
| - name: Run gocyclo | |
| run: ./scripts/check/check --check gocyclo --ci | |
| - name: Run nilaway | |
| run: ./scripts/check/check --check nilaway --ci | |
| - name: Run backend tests | |
| run: ./scripts/check/check --check backend-tests --ci | |
| frontend-checks: | |
| name: Frontend (TypeScript) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install mise | |
| uses: jdx/mise-action@v2 | |
| - name: Install tools with mise | |
| run: mise install | |
| - name: Cache pnpm | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.pnpm-store | |
| key: ${{ runner.os }}-pnpm-${{ hashFiles('frontend/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| working-directory: ./frontend | |
| - name: Cache Go modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('backend/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Build check tool | |
| run: go build -o check . | |
| working-directory: ./scripts/check | |
| - name: Check Prettier | |
| run: ./scripts/check/check --check prettier --ci | |
| - name: Run ESLint | |
| run: ./scripts/check/check --check eslint --ci | |
| - name: Run frontend tests | |
| run: ./scripts/check/check --check frontend-tests --ci | |
| e2e-tests: | |
| name: E2E Tests (Playwright) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install mise | |
| uses: jdx/mise-action@v2 | |
| - name: Install tools with mise | |
| run: mise install | |
| - name: Cache pnpm | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.pnpm-store | |
| key: ${{ runner.os }}-pnpm-${{ hashFiles('frontend/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| working-directory: ./frontend | |
| - name: Install Playwright browsers | |
| run: pnpm exec playwright install --with-deps chromium | |
| working-directory: ./frontend | |
| - name: Cache Go modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('backend/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Run E2E tests | |
| run: pnpm test:e2e | |
| working-directory: ./frontend | |
| env: | |
| VMAIL_TEST_MODE: 'true' | |
| PLAYWRIGHT: '1' |