From 019ec70c72138481bc73bdedaaeea18fafca7994 Mon Sep 17 00:00:00 2001 From: Albert Garde Date: Sun, 28 Jan 2024 14:19:31 +0100 Subject: [PATCH] :construction_worker: Create pre-merge workflow --- .github/workflows/pre-merge.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/pre-merge.yml diff --git a/.github/workflows/pre-merge.yml b/.github/workflows/pre-merge.yml new file mode 100644 index 0000000..689c9c1 --- /dev/null +++ b/.github/workflows/pre-merge.yml @@ -0,0 +1,29 @@ +name: Pre-merge + +on: + pull_request: + branches: [ "main", "ci-test" ] + +env: + CARGO_TERM_COLOR: always + RUSTFLAGS: "-Dwarnings" + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + with: + prefix-key: "rust-dependencies" + - name: Build + run: cargo build --verbose + - name: Clippy + run: cargo clippy --no-deps + - name: Format check + run: cargo fmt --check + - name: Run tests + run: cargo test --verbose \ No newline at end of file