feat: create on-chain reward points system with token conversion and … #375
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, master] | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| backend: | |
| name: Backend CI | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:15-alpine | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: web3-student-lab-test | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| redis: | |
| image: redis:7-alpine | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| defaults: | |
| run: | |
| working-directory: backend | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| cache-dependency-path: backend/package-lock.json | |
| - run: npm install | |
| - name: Setup test database | |
| run: | | |
| npx prisma migrate deploy | |
| - run: npm run build | |
| env: | |
| REDIS_URL: redis://localhost:6379 | |
| DATABASE_URL: postgresql://postgres:postgres@localhost:5432/web3-student-lab-test?schema=public | |
| JWT_SECRET: test-secret-key-that-is-long-enough-for-testing-123456789 | |
| - run: npm test | |
| env: | |
| DATABASE_URL: postgresql://postgres:postgres@localhost:5432/web3-student-lab-test?schema=public | |
| REDIS_URL: redis://localhost:6379 | |
| JWT_SECRET: test-secret-key-that-is-long-enough-for-testing-123456789 | |
| frontend: | |
| name: Frontend CI | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| cache-dependency-path: frontend/package-lock.json | |
| - run: npm install | |
| - run: npm run build | |
| - run: npm run lint |