Edge case tests #56
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-Test | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| if: ${{ !contains(toJSON(github.event.pull_request.labels.*.name), 'ci-skip') }} | |
| timeout-minutes: 10 | |
| # Redis 서비스 컨테이너 추가 | |
| services: | |
| redis: | |
| image: redis | |
| # 포트 맵핑: 6379:6379 | |
| ports: | |
| - 6379:6379 | |
| # 서비스 헬스 체크 설정 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v2 | |
| with: | |
| node-version: '20' | |
| - name: Prepare dot npmrc for private registry | |
| run: echo //npm.pkg.github.com/:_authToken=${{ secrets.GH_TOKEN }} >> ~/.npmrc | |
| - name: Bootstrap | |
| if: steps.node-cache.outputs.cache-hit != 'true' | |
| run: npm ci --legacy-peer-deps | |
| env: | |
| NPM_AUTH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| - name: Lint | |
| run: npm run lint || echo "Linting errors found but continuing with tests" | |
| env: | |
| NODE_ENV: dev | |
| CI: true | |
| - name: Test | |
| run: npm run test | |
| env: | |
| NODE_ENV: test | |
| CI: true | |
| # Redis 연결 정보 환경 변수 추가 | |
| REDIS_HOST: localhost | |
| REDIS_PORT: 6379 | |
| REDIS_DB: 1 |