From 255d69eb8fc575f8f60dc9fb9a6b12135e0dec6c Mon Sep 17 00:00:00 2001 From: Yana Kernerman <kernerya@gmail.com> Date: Sun, 11 Aug 2024 17:35:15 +0200 Subject: [PATCH] run only tests --- .gitlab-ci.yml | 62 +++++++++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b18c3ce..234603c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,35 +18,35 @@ job_test_the_code: - go get -t ./... # Installs dependencies, including those for testing - go test -race -v ./... # Run tests with race detection enabled -job_build_artifact: - stage: build - rules: # Conditions under which this job should run - - if: $CI_COMMIT_REF_NAME =~ /^.*$/ # Run this job for any branch or merge request event. - when: always - image: registry.hub.docker.com/library/golang:1.21 - script: - - go get -t ./... # Installs dependencies - - go build -o ./artifact.bin ./*.go # Builds the Go application and outputs a binary named artifact.bin - artifacts: - paths: # Specifies the paths to the files that are to be saved as artifacts after the job has been completed. - - ./artifact.bin - expire_in: 1 week - -job_publish_artifact: - stage: publish - rules: # Conditions under which this job should run - - if: $CI_COMMIT_REF_NAME =~ /^.*$/ # Run this job for any branch or merge request event. - when: always - image: curlimages/curl:latest # Custom image with curl - tags: - - docker-privileged - dependencies: - - job_build_artifact - script: - - echo "Publishing artifact..." - - | - curl \ - --header "JOB-TOKEN: ${CI_JOB_TOKEN}" \ - --upload-file ./artifact.bin \ - "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/artifacts/${version}/webservice" +#job_build_artifact: +# stage: build +# rules: # Conditions under which this job should run +# - if: $CI_COMMIT_REF_NAME =~ /^.*$/ # Run this job for any branch or merge request event. +# when: always +# image: registry.hub.docker.com/library/golang:1.21 +# script: +# - go get -t ./... # Installs dependencies +# - go build -o ./artifact.bin ./*.go # Builds the Go application and outputs a binary named artifact.bin +# artifacts: +# paths: # Specifies the paths to the files that are to be saved as artifacts after the job has been completed. +# - ./artifact.bin +# expire_in: 1 week +# +#job_publish_artifact: +# stage: publish +# rules: # Conditions under which this job should run +# - if: $CI_COMMIT_REF_NAME =~ /^.*$/ # Run this job for any branch or merge request event. +# when: always +# image: curlimages/curl:latest # Custom image with curl +# tags: +# - docker-privileged +# dependencies: +# - job_build_artifact +# script: +# - echo "Publishing artifact..." +# - | +# curl \ +# --header "JOB-TOKEN: ${CI_JOB_TOKEN}" \ +# --upload-file ./artifact.bin \ +# "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/artifacts/${version}/webservice" -- GitLab