Skip to content

Commit

Permalink
Fix ci (#519)
Browse files Browse the repository at this point in the history
* Fix clippy

* CI remove cw-orch-cli

* CI remove cw-orch-cli

* Removed CLi, keeping CLI docs

* Free disk space on runner in coverage runneré

* Coverage is only CI on main

* Network workflow separation

* Rename + create folder
  • Loading branch information
Kayanski authored Nov 2, 2024
1 parent 67f8118 commit 29af7bf
Show file tree
Hide file tree
Showing 55 changed files with 69 additions and 3,051 deletions.
1 change: 0 additions & 1 deletion .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ ignore:
- "tests"
- "**/examples"
- "**/schema.rs"
- "cw-orch-cli"

# Make comments less noisy
comment:
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
permissions:
contents: read
on:
push:
branches: [main]
name: test
env:
CODECOV_TOKEN: 62fac3fe-498a-4449-a00d-a9b30b443acf
jobs:
coverage:
runs-on: ubuntu-latest
name: ubuntu / stable / coverage
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install stable
uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- name: Free up disk space on runner
run: |
df -h
rm -rf /usr/share/dotnet/
sudo apt-get remove -y 'php.*' || true
sudo apt-get remove -y '^dotnet-.*' || true
sudo apt-get remove -y azure-cli firefox powershell mono-devel || true
sudo apt-get autoremove -y || true
sudo apt-get clean || true
df -h
shell: bash
- name: cargo install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: cargo generate-lockfile
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile
- name: cargo llvm-cov
run: cargo llvm-cov --locked --all-features --lcov --output-path lcov.info
- name: Upload to codecov.io
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
59 changes: 23 additions & 36 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,61 +31,48 @@ jobs:
# https://twitter.com/jonhoo/status/1571290371124260865
- name: cargo test --locked
run: cargo test --locked --all-features --all-targets
- name: cargo test network config
run: |
cp cw-orch-daemon/tests/mock_networks.toml ~/.cw-orchestrator/networks.toml
cargo test --package cw-orch-daemon --lib -- network_config::test --ignored
docs:
network:
runs-on: ubuntu-latest
name: doc-tests / stable
name: ubuntu / ${{ matrix.toolchain }} / network-config
strategy:
matrix:
toolchain: [stable, beta]
toolchain: [
stable, # beta failing to some crate using multiple `thread::set_current`
]
fail-fast: false # beta may fail we shouldn't care
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install stable
- name: Install ${{ matrix.toolchain }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
toolchain: ${{ matrix.toolchain }}
- name: cargo generate-lockfile
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile
- name: cargo test --doc
run: cargo test --doc --locked --all-features

coverage:
# https://twitter.com/jonhoo/status/1571290371124260865
- name: cargo test network config
run: |
mkdir ~/.cw-orchestrator
cp cw-orch-daemon/tests/mock_networks.toml ~/.cw-orchestrator/networks.toml
cargo test --locked --package cw-orch-daemon --lib -- network_config::test --ignored
docs:
runs-on: ubuntu-latest
name: ubuntu / stable / coverage
name: doc-tests / stable
strategy:
matrix:
toolchain: [stable, beta]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install stable
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@master
with:
components: llvm-tools-preview
- name: Free up disk space on runner
run: |
df -h
rm -rf /usr/share/dotnet/
sudo apt-get remove -y 'php.*' || true
sudo apt-get remove -y '^dotnet-.*' || true
sudo apt-get remove -y azure-cli firefox powershell mono-devel || true
sudo apt-get autoremove -y || true
sudo apt-get clean || true
df -h
shell: bash
- name: cargo install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
toolchain: stable
- name: cargo generate-lockfile
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile
- name: cargo llvm-cov
run: cargo llvm-cov --locked --all-features --lcov --output-path lcov.info
- name: Upload to codecov.io
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
- name: cargo test --doc
run: cargo test --doc --locked --all-features
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[workspace]
members = [
"cw-orch",
"cw-orch-cli",
"cw-orch-daemon",
"cw-orch-interchain",
"packages/cw-orch-core",
Expand Down
45 changes: 0 additions & 45 deletions cw-orch-cli/Cargo.toml

This file was deleted.

69 changes: 0 additions & 69 deletions cw-orch-cli/README.md

This file was deleted.

35 changes: 0 additions & 35 deletions cw-orch-cli/src/commands/action/asset/mod.rs

This file was deleted.

50 changes: 0 additions & 50 deletions cw-orch-cli/src/commands/action/asset/query_cw20/mod.rs

This file was deleted.

47 changes: 0 additions & 47 deletions cw-orch-cli/src/commands/action/asset/query_native/mod.rs

This file was deleted.

Loading

0 comments on commit 29af7bf

Please sign in to comment.