diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..3e1aee8 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,29 @@ +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +name: CI + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + - uses: pre-commit/action@v3.0.1 + + build-and-test: + needs: pre-commit + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + source $HOME/.cargo/env + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose