Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:

jobs:
lint:
name: Format and Clippy
name: Clippy
runs-on: ubuntu-latest
env:
SQLX_OFFLINE: true
Expand All @@ -25,15 +25,31 @@ jobs:
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
components: clippy, rustfmt
components: clippy

- name: Cache cargo
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Format check
run: cargo fmt --all --check
- name: Install simplex-cli via simplexup
shell: bash
run: |
set -euo pipefail
curl -fsSL --retry 5 --retry-all-errors --retry-delay 2 https://smplx.simplicity-lang.org | bash
BASE_DIR="${XDG_CONFIG_HOME:-$HOME}"
SIMPLEX_DIR="${SIMPLEX_DIR:-$BASE_DIR/.simplex}"
SIMPLEX_BIN_DIR="$SIMPLEX_DIR/bin"
"$SIMPLEX_BIN_DIR/simplexup"
echo "$SIMPLEX_BIN_DIR" >> "$GITHUB_PATH"
"$SIMPLEX_BIN_DIR/simplex" --version

- name: Generate contract artifacts
shell: bash
run: |
cd crates/contracts
simplex build
test -f src/artifacts/mod.rs

- name: Clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
28 changes: 25 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
strategy:
fail-fast: false
matrix:
toolchain: ["1.90.0", "stable"]
toolchain: ["1.91.0", "stable"]

steps:
- name: Checkout
Expand Down Expand Up @@ -71,6 +71,25 @@ jobs:
fi
echo "$SQLX_CLI_ROOT/bin" >> $GITHUB_PATH

- name: Install simplex-cli via simplexup
shell: bash
run: |
set -euo pipefail
curl -fsSL --retry 5 --retry-all-errors --retry-delay 2 https://smplx.simplicity-lang.org | bash
BASE_DIR="${XDG_CONFIG_HOME:-$HOME}"
SIMPLEX_DIR="${SIMPLEX_DIR:-$BASE_DIR/.simplex}"
SIMPLEX_BIN_DIR="$SIMPLEX_DIR/bin"
"$SIMPLEX_BIN_DIR/simplexup"
echo "$SIMPLEX_BIN_DIR" >> "$GITHUB_PATH"
"$SIMPLEX_BIN_DIR/simplex" --version

- name: Generate contract artifacts
shell: bash
run: |
cd crates/contracts
simplex build
test -f src/artifacts/mod.rs

- name: Create app user in Postgres
run: |
sudo apt-get install postgresql-client
Expand All @@ -88,8 +107,11 @@ jobs:
cd crates/indexer
SKIP_DOCKER=true ./scripts/init_db.sh

- name: Run tests
run: cargo test --workspace --all-features --no-fail-fast --verbose
- name: Run simplex tests
shell: bash
run: |
cd crates/contracts
simplex test --nocapture

- name: Check that queries are fresh
run: cargo sqlx prepare --workspace --check -- --all-targets

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading