From 4447f1ed4acc46a4e2b15bfe205f7c4306a851c9 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Fri, 22 Dec 2023 19:18:30 -0500 Subject: [PATCH] Inline the test pipeline. --- .lighthouse/pipeline-rust-test.yaml | 33 ++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/.lighthouse/pipeline-rust-test.yaml b/.lighthouse/pipeline-rust-test.yaml index 7959062..2d47307 100644 --- a/.lighthouse/pipeline-rust-test.yaml +++ b/.lighthouse/pipeline-rust-test.yaml @@ -81,9 +81,34 @@ spec: workspace: docker-credentials runAfter: - fetch-repository - - name: run-image - taskRef: - name: run-docker-image + - name: run-cargo-test + taskSpec: + metadata: {} + params: + - name: docker-image + type: string + description: Docker image to run. + default: alpine:3.18 + stepTemplate: + image: alpine:3.18 + name: "" + resources: + requests: + cpu: 10m + memory: 600Mi + workingDir: /workspace/source + workspaces: + - name: source + mountPath: /source + - name: cargo-cache + mountPath: /usr/local/cargo/registry + optional: true + steps: + - name: run + image: $(params.docker-image) + workingDir: "$(workspaces.source.path)" + command: [cargo, test, --no-fail-fast] + args: [] workspaces: - name: source workspace: git-source @@ -92,8 +117,6 @@ spec: runAfter: - build-image params: - - name: command - value: [cargo, test, --no-fail-fast] - name: docker-image value: "$(params.image-name):$(tasks.fetch-repository.results.commit)" finally: