diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml new file mode 100644 index 0000000..b71fb6b --- /dev/null +++ b/.github/workflows/check.yaml @@ -0,0 +1,32 @@ +name: check + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Rust (Latest Stable) + uses: dtolnay/rust-toolchain@stable + with: + components: clippy + + - name: Rust Cache + uses: Swatinem/rust-cache@v2 + + - name: Install Just + uses: taiki-e/install-action@just + + - name: Clippy + run: cargo clippy -- -D warnings + + - name: Build + run: just build diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..53a80d0 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,29 @@ +name: test + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Rust (Latest Stable) + uses: dtolnay/rust-toolchain@stable + with: + components: clippy, rustfmt + + - name: Rust Cache + uses: Swatinem/rust-cache@v2 + + - name: Install Just + uses: taiki-e/install-action@just + + - name: Run tests + run: just test diff --git a/.tangled/workflows/check.yaml b/.tangled/workflows/check.yaml index 003b069..4906cca 100644 --- a/.tangled/workflows/check.yaml +++ b/.tangled/workflows/check.yaml @@ -14,7 +14,7 @@ dependencies: steps: - name: clippy command: | - cargo clippy -- -D warnings + cargo clippy -- -d warnings - name: build command: | just build diff --git a/justfile b/justfile index 6abe705..df71417 100644 --- a/justfile +++ b/justfile @@ -18,4 +18,4 @@ run: # Run all tests test: - cargo test {{_cargo_flags}} + cargo test {{_cargo_flags}} --all