From c89febaf801211c7a972a5857c1f42d7d503f3e0 Mon Sep 17 00:00:00 2001 From: Trong Huu Nguyen Date: Thu, 7 Nov 2024 10:32:18 +0100 Subject: [PATCH] build, ci: run tests outside docker --- .github/workflows/build.yml | 5 +++++ .github/workflows/rust.yml | 6 +----- Dockerfile | 1 - 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4f62a17..ffb3fce 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,6 +4,7 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true env: + CARGO_TERM_COLOR: always GOOGLE_REGISTRY: europe-north1-docker.pkg.dev GITHUB_REGISTRY: ghcr.io jobs: @@ -18,6 +19,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose --features docker - uses: nais/platform-build-push-sign@main id: build_push_sign with: diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b3fe022..028cc1d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,10 +1,6 @@ name: Rust -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] +on: [pull_request] env: CARGO_TERM_COLOR: always diff --git a/Dockerfile b/Dockerfile index 8e68c21..1939b7d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,6 @@ RUN \ export CC_aarch64_unknown_linux_musl=aarch64-linux-gnu-gcc ; \ export CXX_aarch64_unknown_linux_musl=aarch64-linux-gnu-g++ ; \ fi ; \ - cargo test --release --target ${TARGET} --features docker -- --test-threads 1 ; \ cargo build --release --target ${TARGET} && mkdir -p target/final/release/ && mv target/${TARGET}/release/texas target/final/release/texas ; \ file target/final/release/texas