From 0251b4299870de0bc22785abfea416e4c1da7ab7 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Wed, 10 Jan 2024 20:47:44 +0100 Subject: [PATCH] add cargo workflow --- .gitea/workflows/cargo.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .gitea/workflows/cargo.yaml diff --git a/.gitea/workflows/cargo.yaml b/.gitea/workflows/cargo.yaml new file mode 100644 index 0000000..c8f5025 --- /dev/null +++ b/.gitea/workflows/cargo.yaml @@ -0,0 +1,23 @@ +name: Cargo Build & Test + +on: + push: + pull_request: + +env: + CARGO_TERM_COLOR: always + +jobs: + build_and_test: + name: Rust project - latest + strategy: + matrix: + toolchain: + - stable + steps: + - uses: actions/checkout@v3 + - run: rustupsh=$(mktemp); curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > $rustupsh && sh $rustupsh -y + - run: source "$HOME/.cargo/env" && rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} + - run: cargo check --verbose + - run: cargo build --verbose + - run: cargo test --verbose