305 add clients info crate for spacewalk to pendulum #437
Workflow file for this run
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: Test Code | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
test-code: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Freeing up more disk space | |
run: | | |
sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android | |
sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET | |
sudo rm -rf /opt/ghc | |
sudo rm -rf /usr/local/share/boost | |
sudo rm -rf /opt/hostedtoolcache/CodeQL | |
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
- name: Install package | |
run: | | |
echo 'APT::Get::Always-Include-Phased-Updates "false";' | sudo tee /etc/apt/apt.conf.d/99-phased-updates | |
sudo apt-get update && sudo apt-get upgrade -y | |
sudo apt-get install -y protobuf-compiler libprotobuf-dev | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
# Steps taken from https://github.com/actions/cache/blob/master/examples.md#rust---cargo | |
- name: Cache cargo registry | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
- name: Install toolchain | |
# Call `rustup show` as a hack so that the toolchain defined in rust-toolchain.toml is installed | |
run: rustup show | |
# Enable this for clippy linting. | |
# - name: Check and Lint Code | |
# run: cargo +nightly-2021-12-01 clippy -- -D warnings | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v1 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check Code | |
run: cargo check | |
- name: Test Code | |
run: cargo test |