From eea7cd1b4c4325ad5b74106dbec357bc9ec0931c Mon Sep 17 00:00:00 2001 From: itsscb Date: Wed, 14 Aug 2024 11:14:13 +0200 Subject: [PATCH] Create prod.yml --- .github/workflows/prod.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/prod.yml diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml new file mode 100644 index 0000000..f27b92a --- /dev/null +++ b/.github/workflows/prod.yml @@ -0,0 +1,38 @@ +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Install protoc + uses: arduino/setup-protoc@v1 + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: | + ~/.cargo + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo- + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + + - name: Build and test code + run: | + cargo build --verbose + cargo test --verbose