diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 0000000..eb08a87 --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,43 @@ +name: Build and Test Library + +on: + push: + paths: + - "src/**" + - "Cargo.toml" + - ".github/workflows/build-and-test.yml" # This file + branches: + - main + + pull_request: + paths: + - "src/**" + - "Cargo.toml" + - ".github/workflows/build-and-test.yml" # This file + + workflow_dispatch: + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + - name: Build project + run: cargo build --release + + - name: Test project + run: cargo test + + - name: Build Examples + run: cargo build --release --examples \ No newline at end of file