diff --git a/.github/workflows/test-and-lint.yml b/.github/workflows/test-and-lint.yml new file mode 100644 index 0000000..3d45ec5 --- /dev/null +++ b/.github/workflows/test-and-lint.yml @@ -0,0 +1,38 @@ +name: ๐งช Test and Lint +on: + push: + branches-ignore: [wip/**] +jobs: + test: + strategy: + matrix: + os: [[๐ง, Ubuntu], [๐, macOS], [๐ช, Windows]] + toolchain: ["stable", "beta", "nightly"] + name: Test ๐ฆ Rust ${{ matrix.toolchain }} on ${{ matrix.os[0] }} ${{ matrix.os[1] }} + runs-on: ${{ matrix.os[1] }}-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Rust Cache + uses: Swatinem/rust-cache@v2 + - name: Setup Rust + uses: dtolnay/rust-toolchain@stable + with: { toolchain: matrix.toolchain } + - name: Test + run: make test + + lint: + name: ๐ Lint and Cover + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Rust Cache + uses: Swatinem/rust-cache@v2 + - name: Setup Rust + uses: dtolnay/rust-toolchain@stable + with: { components: llvm-tools } + - name: Install Crates + run: cargo install grcov + - name: Run pre-commit + uses: pre-commit/action@v3.0.1