Prepare for BelieveAthon #1680
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
name: modules-check | |
permissions: | |
contents: read | |
on: | |
push: | |
branches: [main] | |
paths: | |
- "modules/**" | |
pull_request: | |
paths: | |
- "modules/**" | |
jobs: | |
fmt: | |
runs-on: ubuntu-latest | |
name: stable / fmt | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: | | |
${{ secrets.SSH_PRIVATE_KEY_MULTI_TEST }} | |
${{ secrets.SSH_PRIVATE_KEY_CW_ORCH_INTERCHAIN }} | |
- name: Install stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- name: cargo fmt --check | |
working-directory: ./modules | |
run: cargo fmt --check | |
clippy: | |
runs-on: ubuntu-latest | |
name: ${{ matrix.toolchain }} / clippy | |
permissions: | |
contents: read | |
checks: write | |
strategy: | |
fail-fast: false | |
matrix: | |
toolchain: [stable, beta] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: | | |
${{ secrets.SSH_PRIVATE_KEY_MULTI_TEST }} | |
${{ secrets.SSH_PRIVATE_KEY_CW_ORCH_INTERCHAIN }} | |
- name: Install ${{ matrix.toolchain }} | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
components: clippy | |
- name: cargo clippy | |
working-directory: ./modules | |
run: cargo clippy --all-targets --all-features -- -D warnings | |
doc: | |
runs-on: ubuntu-latest | |
name: nightly / doc | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: | | |
${{ secrets.SSH_PRIVATE_KEY_MULTI_TEST }} | |
${{ secrets.SSH_PRIVATE_KEY_CW_ORCH_INTERCHAIN }} | |
- name: Install nightly | |
uses: dtolnay/rust-toolchain@nightly | |
- name: cargo doc | |
working-directory: ./modules | |
run: cargo doc --no-deps --all-features | |
env: | |
RUSTDOCFLAGS: --cfg docsrs | |
hack: | |
runs-on: ubuntu-latest | |
name: ubuntu / stable / features | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: | | |
${{ secrets.SSH_PRIVATE_KEY_MULTI_TEST }} | |
${{ secrets.SSH_PRIVATE_KEY_CW_ORCH_INTERCHAIN }} | |
- name: Install stable | |
uses: dtolnay/rust-toolchain@stable | |
- name: cargo install cargo-hack | |
uses: taiki-e/install-action@cargo-hack | |
- name: cargo hack | |
working-directory: ./modules | |
run: | | |
cargo hack check --feature-powerset \ | |
--mutually-exclusive-features \ | |
wynd,osmosis,astroport,bow,terraswap,astrovault,testing,osmosis-test,node-tests,interface,cw-orch,schema \ | |
--lib --tests | |
# Find any unused dependencies | |
unused-deps: | |
runs-on: ubuntu-latest | |
name: nigtly / unused-deps | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: | | |
${{ secrets.SSH_PRIVATE_KEY_MULTI_TEST }} | |
${{ secrets.SSH_PRIVATE_KEY_CW_ORCH_INTERCHAIN }} | |
- name: Setup sccache | |
uses: mozilla-actions/[email protected] | |
with: | |
version: "v0.8.1" | |
- name: Install cargo-machete | |
uses: clechasseur/rs-cargo@v2 | |
with: | |
command: install | |
args: cargo-machete | |
- name: Machete | |
uses: clechasseur/rs-cargo@v2 | |
with: | |
command: machete | |
working-directory: ./modules |