diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index ff5f0e4044..bcfe39b68a 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -1,101 +1,18 @@ -name: Nightly tests on main +# Nightly sanity checks +name: nightly on: + workflow_dispatch: {} + # Once per day at 00:00 UTC schedule: - - cron: '0 0 * * *' + - cron: "0 0 * * *" -jobs: - linux_exhaustive: - runs-on: buildjet-16vcpu-ubuntu-2204 - steps: - - uses: actions/checkout@v4 - with: - repository: lurk-lab/ci-workflows - - uses: ./.github/actions/ci-env - - uses: actions/checkout@v4 - with: - submodules: recursive - - name: Install dependencies - run: sudo apt-get install -y pkg-config libssl-dev - - uses: dtolnay/rust-toolchain@stable - - uses: taiki-e/install-action@nextest - - uses: Swatinem/rust-cache@v2 - - name: Linux Tests - id: tests - run: | - cargo nextest run --profile ci --workspace --cargo-profile dev-ci --run-ignored all - continue-on-error: true - - name: Benches build successfully - id: benches - run: | - cargo bench --no-run --profile dev-ci - continue-on-error: true - - name: Linux Doc Tests - id: doctests - run: | - cargo test --doc --workspace --profile dev-ci - continue-on-error: true - - - name: Gather status in a single variable - if: steps.tests.outcome == 'success' && steps.benches.outcome == 'success' && steps.doctests.outcome == 'success' - run: echo "status=true" >> $GITHUB_ENV - - - name: Debug - run: | - echo ${{ steps.tests.outcome }} - echo ${{ steps.benches.outcome }} - echo ${{ steps.doctests.outcome }} - echo ${{ env.status }} - - - name: Amend MESSAGE for tests - if: steps.tests.outcome != 'success' - run: echo "MESSAGE=${{ env.MESSAGE }} Exhaustive test run failed in https://github.com/lurk-lab/lurk-rs/actions/runs/${{ github.run_id }}" >> $GITHUB_ENV - - - name: Amend MESSAGE for benches - if: steps.benches.outcome != 'success' - run: echo "MESSAGE=${{ env.MESSAGE }} Bench compilation failed in https://github.com/lurk-lab/lurk-rs/actions/runs/${{ github.run_id }}" >> $GITHUB_ENV +env: + CARGO_TERM_COLOR: always - - name: Amend MESSAGE for doctests - if: steps.doctests.outcome != 'success' - run: echo "MESSAGE=${{ env.MESSAGE }} Doc test run failed in https://github.com/lurk-lab/lurk-rs/actions/runs/${{ github.run_id }}" >> $GITHUB_ENV - - - name: Find the last report issue open - id: last_issue - uses: micalevisk/last-issue-action@v2 - with: - state: open - labels: | - nightly - automated issue - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Close last report open issue - if: env.status == 'true' && steps.last_issue.outputs.has-found == 'true' - uses: peter-evans/close-issue@v3 - with: - issue-number: ${{ steps.last_issue.outputs.issue-number }} - comment: "All nightly tests succeeded" - - - name: Update last report open issue - if: env.status != 'true' && steps.last_issue.outputs.has-found == 'true' - uses: peter-evans/create-or-update-comment@v3 - with: - issue-number: ${{ steps.last_issue.outputs.issue-number }} - body: ${{ env.MESSAGE }} - edit-mode: replace +jobs: + unused-dependencies: + uses: lurk-lab/ci-workflows/.github/workflows/unused-deps.yml@main - - name: Create file for issue - if: env.status != 'true' && steps.last_issue.outputs.has-found == 'false' - run: echo "${{ env.MESSAGE }}" > ./_body.md - - - name: Create issue from report - if: env.status != 'true' && steps.last_issue.outputs.has-found == 'false' - uses: peter-evans/create-issue-from-file@v4 - with: - title: Nightly run failed - content-filepath: ./_body.md - labels: | - nightly - automated issue - + rust-version-check: + uses: lurk-lab/ci-workflows/.github/workflows/rust-version-check.yml@main \ No newline at end of file