Skip to content

Env Configuration + Readme Tweaks #60

Env Configuration + Readme Tweaks

Env Configuration + Readme Tweaks #60

Workflow file for this run

name: checks
on:
pull_request:
merge_group:
push:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: dsherret/rust-toolchain-file@v1
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-check-${{ hashFiles('**/Cargo.lock') }}
- run: RUSTFLAGS="-D warnings" cargo check --all-targets
clippy:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: dsherret/rust-toolchain-file@v1
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-clippy-${{ hashFiles('**/Cargo.lock') }}
- run: RUSTFLAGS="-D warnings" cargo clippy --all-targets
test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: dsherret/rust-toolchain-file@v1
- uses: extractions/setup-just@v2
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-test-${{ hashFiles('**/Cargo.lock') }}
- name: Setup
run: |
cp .env.example .env
just get-mainnet-archive-db
just pg
just wait-for-pg
- name: Test
run: just test
- name: Tear down
run: just pg-down
rustfmt:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: dsherret/rust-toolchain-file@v1
- run: cargo fmt --check
dprint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/setup-node@v4
with:
node-version: 18
- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-dprint
- run: npm i -g sql-formatter
- uses: actions/checkout@v4
- uses: dprint/[email protected]
cspell:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: streetsidesoftware/cspell-action@v6
with:
incremental_files_only: false