From 3fdaa30487ed632879292888ebd06e6d8e83fad0 Mon Sep 17 00:00:00 2001 From: myyrakle Date: Sat, 16 Mar 2024 02:10:32 +0900 Subject: [PATCH] =?UTF-8?q?[#65]=20TEST=20workflow=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr_test.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/pr_test.yml diff --git a/.github/workflows/pr_test.yml b/.github/workflows/pr_test.yml new file mode 100644 index 00000000..075d6b17 --- /dev/null +++ b/.github/workflows/pr_test.yml @@ -0,0 +1,32 @@ +name: Cargo Build & Test + +on: + pull_request: + +env: + CARGO_TERM_COLOR: always + +jobs: + build_and_test: + name: Rust project - latest + runs-on: ubuntu-latest + strategy: + matrix: + toolchain: + - stable + steps: + - uses: actions/checkout@v3 + + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.toml') }} + + - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} + + - run: cargo build --verbose + - run: cargo test --verbose