Skip to content

Nightly

Nightly #494

Workflow file for this run

name: Nightly
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # at 12:00:00pm every day
jobs:
check-latest-commit-date:
name: Check the latest commit
runs-on: ubuntu-latest
outputs:
should-run: ${{ steps.should-run.outputs.should-run }}
steps:
- uses: actions/checkout@v3
- name: Check the latest commit
id: should-run
continue-on-error: true
if: ${{ github.event_name == 'schedule' }}
run: |
[[ $(git rev-list --after="24 hours" --first-parent HEAD) ]] && echo "should-run=true" >> $GITHUB_OUTPUT
test:
name: Full test
runs-on: ubuntu-latest
timeout-minutes: 1200
needs: check-latest-commit-date
if: needs.check-latest-commit-date.outputs.should-run == 'true'
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
all_but_latest: true
access_token: ${{ github.token }}
- name: Check out the repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install dependencies
run: pnpm install
- name: Lint
run: pnpm lint
- name: Test
run: pnpm test