From 64e6ddce6ce53e9da7a462083f7490bb0d773420 Mon Sep 17 00:00:00 2001 From: Kavika Date: Wed, 13 Nov 2024 13:59:39 +1100 Subject: [PATCH] add `cargo run` to CI/CD for rust --- .github/workflows/rust.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 8788bb70..9e85c56d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -30,7 +30,11 @@ jobs: echo "GOOGLE_CLIENT_ID=test" >> backend/.env echo "GOOGLE_CLIENT_SECRET=test" >> backend/.env echo "GOOGLE_REDIRECT_URI=http://localhost:3000/auth/callback" >> backend/.env - echo "ROCKET_DATABASES='{}'" >> backend/.env + echo "S3_BUCKET_NAME=chaos-storage" >> backend/.env + echo "S3_ACCESS_KEY=test_access_key" >> backend/.env + echo "S3_SECRET_KEY=test_secret_key" >> backend/.env + echo "S3_ENDPOINT=https://chaos-storage.s3.ap-southeast-1.amazonaws.com" >> backend/.env + echo "S3_REGION_NAME=ap-southeast-1" >> backend/.env # selecting a toolchain either by action or manual `rustup` calls should happen # before the plugin, as it uses the current rustc version as its cache key - uses: actions-rs/toolchain@v1 @@ -57,6 +61,9 @@ jobs: - name: Build working-directory: backend/server run: cargo build + - name: Run + working-directory: backend/server + run: timeout 30 cargo run - name: Cargo Clippy working-directory: backend/server run: cargo clippy