name: Tests # Runs the test suite on pushes to main and on pull requests. on: push: branches: [main] pull_request: permissions: contents: read jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: npm ci - run: npm test # The shared Kotlin tests (tests/kotlin, on the JVM host). Pinned to # ubuntu-24.04 for the Android SDK its image carries; the JDK is pinned # explicitly because Gradle 8.14 can't run on the JDK 25 that is the default # on ubuntu-26.04 (now ubuntu-latest), failing with just "25.0.5". test-kotlin: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 with: distribution: temurin java-version: '17' - run: npm ci - run: npm run test:kotlin # The stats.faceclaw.org server: typecheck, and the tests including the # database one against a throwaway Postgres. stats-server: runs-on: ubuntu-latest defaults: run: working-directory: stats-server services: postgres: image: postgres:16 env: POSTGRES_PASSWORD: postgres ports: ["5432:5432"] options: >- --health-cmd pg_isready --health-interval 5s --health-timeout 5s --health-retries 10 env: PGHOST: localhost PGUSER: postgres PGPASSWORD: postgres STATS_TEST_DATABASE: postgres steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 22 - run: npm ci - run: npm run check - run: npm test # The @faceclaw/evenhub-extensions npm package: typecheck (including # compatibility with the stock SDK's container classes), build, and check # that the committed API reference matches the source. evenhub-extensions: runs-on: ubuntu-latest defaults: run: working-directory: evenhub-extensions steps: - uses: actions/checkout@v4 - run: npm ci - run: npm run check - run: npm run build - run: npm run docs - run: git diff --exit-code -- docs