From 1b28226f9813f66bf49ce36c1156c72014bf93ac Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Sat, 27 Apr 2024 14:36:18 +1200 Subject: [PATCH] Setup GitHub Actions Continuous Integration tests Running tests on Ubuntu-22.04. Workflow adapted from https://doc.rust-lang.org/cargo/guide/continuous-integration.html#github-actions. --- .github/workflows/test.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..d55baf0 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,28 @@ +name: Run tests + +on: + push: + branches: [ "main" ] + pull_request: + types: [ opened, reopened, synchronize ] + branches: [ "main" ] + +env: + CARGO_TERM_COLOR: always + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Build + run: cargo build --verbose + + - name: Run tests + run: cargo test --verbose