name: Rust on: push: branches: [ main ] pull_request: branches: [ main ] env: CARGO_TERM_COLOR: always jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Cache build data uses: actions/cache@v2 with: path: | target/**/build target/**/deps key: ${{ runner.os }}-build-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-build- ${{ runner.os }}- - name: Build run: cargo build --verbose - name: Run tests run: cargo test --verbose