-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
50be622
commit f80a5e3
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Nightly Tests | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' # Run every day at midnight UTC | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
REGISTRY: ghcr.io | ||
|
||
jobs: | ||
nightly-tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
job: [build-sway-lib, forc-inline-tests, contributing-book, build-forc-doc-sway-libs, build-examples] | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: nightly | ||
components: rustfmt | ||
|
||
- name: Init cache | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Install Fuel toolchain | ||
uses: FuelLabs/[email protected] | ||
with: | ||
toolchain: nightly | ||
|
||
- name: Run ${{ matrix.job }} | ||
run: | | ||
if [ "${{ matrix.job }}" = "build-sway-lib" ]; then | ||
forc fmt --path libs --check | ||
cargo fmt --manifest-path tests/Cargo.toml --verbose --check | ||
forc build --path libs --release --locked | ||
forc build --path tests --release --locked | ||
cargo test --manifest-path tests/Cargo.toml | ||
elif [ "${{ matrix.job }}" = "forc-inline-tests" ]; then | ||
forc build --path libs --release --locked && forc test --path libs --locked | ||
forc build --path tests --release --locked && forc test --path tests --locked | ||
elif [ "${{ matrix.job }}" = "contributing-book" ]; then | ||
forc fmt --path docs/contributing-book/src/code --check | ||
forc build --path docs/contributing-book/src/code --release | ||
elif [ "${{ matrix.job }}" = "build-forc-doc-sway-libs" ]; then | ||
forc doc --manifest-path libs | ||
elif [ "${{ matrix.job }}" = "build-examples" ]; then | ||
forc fmt --path examples --check | ||
cargo fmt --manifest-path examples/Cargo.toml --verbose --check | ||
forc build --path examples --release --locked | ||
cargo test --manifest-path examples/Cargo.toml | ||
fi |