Fix flag detection and add failure reason to student report #163
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| branches: [main, preview] | |
| push: | |
| branches: [preview] | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 2 * * *' # daily at 2am UTC — runs autosave cleanup | |
| jobs: | |
| build: | |
| name: Build check | |
| runs-on: ubuntu-latest | |
| if: github.event_name != 'schedule' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| env: | |
| DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
| NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }} | |
| NEXTAUTH_URL: https://dbirecoding.vercel.app | |
| RUNNER_URL: https://code-runner-cpqt.onrender.com | |
| RUNNER_API_KEY: dummy | |
| cleanup: | |
| name: Autosave cleanup | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run autosave cleanup | |
| run: npm run cleanup | |
| env: | |
| DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
| AUTOSAVE_RETENTION_DAYS: 3 |