Skip to content

https://github.com/bcoe/v8-coverage/pull/2 #11

https://github.com/bcoe/v8-coverage/pull/2

https://github.com/bcoe/v8-coverage/pull/2 #11

Workflow file for this run

name: Run Daily Service Tests
on:
schedule:
- cron: '45 3 * * *'
# At 03:45, daily
workflow_dispatch:
push:
jobs:
daily-tests:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: ci_test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
with:
node-version: 22
env:
NPM_CONFIG_ENGINE_STRICT: 'false'
- name: Migrate DB
run: npm run migrate up
env:
POSTGRES_URL: postgresql://postgres:postgres@localhost:5432/ci_test
- name: Run core tests
run: npm run coverage:test:core
if: always()
env:
mocha_reporter: mocha-junit-reporter
MOCHA_FILE: junit/core/results.xml
- name: Run package tests
run: npm run coverage:test:package
if: always()
env:
mocha_reporter: mocha-junit-reporter
MOCHA_FILE: junit/package/results.xml
- name: Run entrypoint tests
run: npm run coverage:test:entrypoint
if: always()
env:
mocha_reporter: mocha-junit-reporter
MOCHA_FILE: junit/entrypoint/results.xml
- name: Run integration tests
run: npm run coverage:test:integration
if: always()
env:
mocha_reporter: mocha-junit-reporter
MOCHA_FILE: junit/integration/results.xml
GH_TOKEN: '${{ secrets.GH_PAT }}'
POSTGRES_URL: postgresql://postgres:postgres@localhost:5432/ci_test
- name: Run service tests
run: npm run coverage:test:services
if: always()
env:
RETRY_COUNT: 3
GH_TOKEN: '${{ secrets.GH_PAT }}'
LIBRARIESIO_TOKENS: '${{ secrets.SERVICETESTS_LIBRARIESIO_TOKENS }}'
OBS_USER: '${{ secrets.SERVICETESTS_OBS_USER }}'
OBS_PASS: '${{ secrets.SERVICETESTS_OBS_PASS }}'
PEPY_KEY: '${{ secrets.SERVICETESTS_PEPY_KEY }}'
SL_INSIGHT_USER_UUID: '${{ secrets.SERVICETESTS_SL_INSIGHT_USER_UUID }}'
SL_INSIGHT_API_TOKEN: '${{ secrets.SERVICETESTS_SL_INSIGHT_API_TOKEN }}'
TWITCH_CLIENT_ID: '${{ secrets.SERVICETESTS_TWITCH_CLIENT_ID }}'
TWITCH_CLIENT_SECRET: '${{ secrets.SERVICETESTS_TWITCH_CLIENT_SECRET }}'
WHEELMAP_TOKEN: '${{ secrets.SERVICETESTS_WHEELMAP_TOKEN }}'
YOUTUBE_API_KEY: '${{ secrets.SERVICETESTS_YOUTUBE_API_KEY }}'
mocha_reporter: mocha-junit-reporter
MOCHA_FILE: junit/services/results.xml
- name: Upload artifact
uses: actions/upload-artifact@v4
if: always()
with:
path: junit/**/*