From e643e7424bed6676a605051b34587775684d7c41 Mon Sep 17 00:00:00 2001 From: Peter Kurfer Date: Tue, 31 Jan 2023 21:18:59 +0100 Subject: [PATCH] chore(ci): set memory limits for CI jobs --- .concourse/branch-validate.yml | 24 +++++++++++++++++++++++- .concourse/tasks/lint.yml | 4 ++++ .concourse/tasks/test.yml | 4 ++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/.concourse/branch-validate.yml b/.concourse/branch-validate.yml index 4500611..e876c22 100644 --- a/.concourse/branch-validate.yml +++ b/.concourse/branch-validate.yml @@ -14,7 +14,7 @@ resources: uri: https://code.icb4dc0.de/prskr/pipeline-templates.git jobs: - - name: lint + - name: validate plan: - get: gapr.git trigger: true @@ -40,3 +40,25 @@ jobs: context: concourse-ci/lint/golangci-lint description: Lint Go files state: failure + - task: test + file: gapr.git/.concourse/tasks/test.yml + privileged: true + input_mapping: {repo: gapr.git} + on_success: + task: report-success + file: templates.git/tasks/gitea-status.yml + input_mapping: {repo: gapr.git} + vars: + project_path: prskr/gapr + context: concourse-ci/test/gotestsum + description: Run unit tests + state: success + on_failure: + task: report-failure + file: templates.git/tasks/gitea-status.yml + input_mapping: {repo: gapr.git} + vars: + project_path: prskr/gapr + context: concourse-ci/test/gotestsum + description: Run unit tests + state: failure diff --git a/.concourse/tasks/lint.yml b/.concourse/tasks/lint.yml index 964dba3..9513e64 100644 --- a/.concourse/tasks/lint.yml +++ b/.concourse/tasks/lint.yml @@ -14,8 +14,12 @@ inputs: params: GO111MODULE: "on" CGO_ENABLED: "0" + GOMEMLIMIT: "1150MiB" GITEA_TOKEN: ((gitea-credentials.token)) +container_limits: + memory: 1258291200 # 1200MB + run: path: bash args: diff --git a/.concourse/tasks/test.yml b/.concourse/tasks/test.yml index fda54dc..4e07a22 100644 --- a/.concourse/tasks/test.yml +++ b/.concourse/tasks/test.yml @@ -14,8 +14,12 @@ inputs: params: GO111MODULE: "on" CGO_ENABLED: "1" + GOMEMLIMIT: "1150MiB" GITEA_TOKEN: ((gitea-credentials.token)) +container_limits: + memory: 1258291200 # 1200MB + run: path: bash args: