Merge pull request #182 from oldtaker24/fix/webhook-caps-leader-reent… #105
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 | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| services: | |
| redis: | |
| image: redis:7-alpine | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| env: | |
| NODE_ENV: test | |
| REDIS_HOST: 127.0.0.1 | |
| REDIS_PORT: 6379 | |
| COINGECKO_API_KEY: ${{ secrets.COINGECKO_API_KEY }} | |
| COINMARKETCAP_API_KEY: ${{ secrets.COINMARKETCAP_API_KEY }} | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js 20 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Lint OpenAPI spec | |
| run: npx @redocly/cli lint openapi.yaml | |
| - name: Run tests | |
| run: npm test | |
| docker-build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Build Docker image | |
| run: docker build -t smartdrop-backend:ci . |