|
| 1 | +name: Coveralls Code Coverage |
| 2 | +on: ['push'] |
| 3 | + |
| 4 | +jobs: |
| 5 | + coveralls-code-coverage: |
| 6 | + runs-on: ubuntu-latest |
| 7 | + |
| 8 | + services: |
| 9 | + postgres: |
| 10 | + image: postgres |
| 11 | + env: |
| 12 | + POSTGRES_USER: postgres |
| 13 | + POSTGRES_PASSWORD: postgres |
| 14 | + POSTGRES_DB: ci_test |
| 15 | + options: >- |
| 16 | + --health-cmd pg_isready |
| 17 | + --health-interval 10s |
| 18 | + --health-timeout 5s |
| 19 | + --health-retries 5 |
| 20 | + ports: |
| 21 | + - 5432:5432 |
| 22 | + |
| 23 | + steps: |
| 24 | + - name: Checkout |
| 25 | + uses: actions/checkout@v4 |
| 26 | + |
| 27 | + - name: Setup |
| 28 | + uses: ./.github/actions/setup |
| 29 | + with: |
| 30 | + node-version: 20 |
| 31 | + |
| 32 | + - name: Migrate DB |
| 33 | + run: npm run migrate up |
| 34 | + env: |
| 35 | + POSTGRES_URL: postgresql://postgres:postgres@localhost:5432/ci_test |
| 36 | + shell: bash |
| 37 | + |
| 38 | + - name: Coverage Tests |
| 39 | + run: npm run coverage:test coverage:test:services |
| 40 | + continue-on-error: true |
| 41 | + env: |
| 42 | + RETRY_COUNT: 3 |
| 43 | + GH_TOKEN: '${{ secrets.GH_PAT }}' |
| 44 | + LIBRARIESIO_TOKENS: '${{ secrets.SERVICETESTS_LIBRARIESIO_TOKENS }}' |
| 45 | + OBS_USER: '${{ secrets.SERVICETESTS_OBS_USER }}' |
| 46 | + OBS_PASS: '${{ secrets.SERVICETESTS_OBS_PASS }}' |
| 47 | + PEPY_KEY: '${{ secrets.SERVICETESTS_PEPY_KEY }}' |
| 48 | + SL_INSIGHT_USER_UUID: '${{ secrets.SERVICETESTS_SL_INSIGHT_USER_UUID }}' |
| 49 | + SL_INSIGHT_API_TOKEN: '${{ secrets.SERVICETESTS_SL_INSIGHT_API_TOKEN }}' |
| 50 | + TWITCH_CLIENT_ID: '${{ secrets.SERVICETESTS_TWITCH_CLIENT_ID }}' |
| 51 | + TWITCH_CLIENT_SECRET: '${{ secrets.SERVICETESTS_TWITCH_CLIENT_SECRET }}' |
| 52 | + WHEELMAP_TOKEN: '${{ secrets.SERVICETESTS_WHEELMAP_TOKEN }}' |
| 53 | + YOUTUBE_API_KEY: '${{ secrets.SERVICETESTS_YOUTUBE_API_KEY }}' |
| 54 | + POSTGRES_URL: postgresql://postgres:postgres@localhost:5432/ci_test |
| 55 | + shell: bash |
| 56 | + |
| 57 | + - name: Coveralls GitHub Action |
| 58 | + uses: coverallsapp/github-action@v2 |
0 commit comments