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@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
      with:
        go-version: "^1.26"
    - name: Set up Node.js
      uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
      with:
        node-version: "22"
    - name: Run server conformance tests
      run: ./scripts/server-conformance.sh
