diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 151f7a4..8834f59 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -7,17 +7,25 @@ on: branches: [ main ] jobs: - build: - + build-and-test: runs-on: ubuntu-latest - + steps: - - uses: actions/checkout@v2 + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y curl + - name: Install Rust run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - env: - PATH: $HOME/.cargo/bin:$PATH - - name: Build + shell: bash + + - name: Add Rust to PATH + run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH + + - name: Build project run: cargo build --verbose + - name: Run tests run: cargo test --verbose