| 1 | on: |
| 2 | push: |
| 3 | branches: ["master"] |
| 4 | |
| 5 | name: Build and Test |
| 6 | |
| 7 | jobs: |
| 8 | build-and-test: |
| 9 | name: Build and Test |
| 10 | runs-on: ubuntu-latest |
| 11 | steps: |
| 12 | - name: Checkout sources |
| 13 | uses: actions/checkout@v2 |
| 14 | |
| 15 | - name: Install stable toolchain |
| 16 | uses: actions-rs/toolchain@v1 |
| 17 | with: |
| 18 | profile: minimal |
| 19 | toolchain: stable |
| 20 | override: true |
| 21 | |
| 22 | - name: Run cargo check |
| 23 | uses: actions-rs/cargo@v1 |
| 24 | with: |
| 25 | command: check |
| 26 | |
| 27 | - name: Install external test dependencies |
| 28 | run: | |
| 29 | sudo apt update |
| 30 | sudo apt install btrfs-progs |
| 31 | |
| 32 | - name: Run tests |
| 33 | run: ./test.sh |