Test files #1
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: Golem CLI Tests | |
on: | |
push: | |
paths: | |
- 'golem-cli/**' | |
- '.github/workflows/golem-cli-tests.yml' | |
pull_request: | |
paths: | |
- 'golem-cli/**' | |
- '.github/workflows/golem-cli-tests.yml' | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
name: Test Golem CLI | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Protoc | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y protobuf-compiler | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
- name: Cache Dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Check Format | |
working-directory: ./golem-cli | |
run: cargo fmt --all -- --check | |
- name: Run Clippy | |
working-directory: ./golem-cli | |
run: cargo clippy -- -D warnings | |
- name: Run Tests | |
working-directory: ./golem-cli | |
run: cargo test --all-features -- --nocapture |