From 247f70933724b46c4ae7ace4d3d196a146dc8326 Mon Sep 17 00:00:00 2001 From: trivernis Date: Sat, 22 May 2021 12:01:55 +0200 Subject: [PATCH] Add tests with GITHUB ACTIONS Signed-off-by: trivernis --- .github/workflows/build.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..96d9e50 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,33 @@ +name: Build and Test + +on: + push: + branches: [ main, develop ] + pull_request: + branches: [ main, develop ] + +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 + ~/.cargo/ + key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo- + - name: Build + run: cargo build --verbose + + - name: Run tests + run: cargo test --verbose -- --test-threads 3 \ No newline at end of file