name: Nightly

on:
  schedule:
    - cron: '0 2 * * *'  # 2 AM UTC daily

  workflow_dispatch:

permissions:
  contents: read

jobs:
  vulncheck:
    runs-on: ubuntu-latest
    steps:
    - name: Run govulncheck
      uses: golang/govulncheck-action@b625fbe08f3bccbe446d94fbf87fcc875a4f50ee # v1.0.4
      with:
           go-version-file: go.mod
           go-package: ./...

  conformance:
    runs-on: ubuntu-latest
    steps:
    - name: Check out code
      uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
    - name: Set up Go
      uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
      with:
        go-version: "^1.25"
    - name: Set up Node.js
      uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
      with:
        node-version: "22"
    - name: Run server conformance tests
      run: ./scripts/server-conformance.sh
