Merge pull request #1 from ComBba/test/routes-coverage-improvement #6
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] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: [self-hosted, macos, arm64, kimsejun-macmini] | |
| # Mac Mini M 시리즈 (kimsejun-macmini) | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Type check | |
| run: npm run typecheck || echo "Typecheck skipped" | |
| - name: Lint | |
| run: npm run lint || echo "Lint skipped" | |
| - name: Run tests | |
| run: npm test | |
| - name: Build | |
| run: npm run build | |
| docker: | |
| runs-on: [self-hosted, macos, arm64, kimsejun-macmini] | |
| needs: test | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Build Docker image | |
| run: | | |
| docker build -t youtube-trend-collector:test . | |
| echo "✅ Docker image built successfully" | |
| - name: Test Docker container | |
| run: | | |
| docker run --rm -d --name yt-test -p 3001:3000 youtube-trend-collector:test | |
| sleep 5 | |
| curl -s http://localhost:3001/api/health || echo "Health check skipped" | |
| docker stop yt-test || true |