Skip to content
Snippets Groups Projects
Commit 0fb29710 authored by Manuel Kieweg's avatar Manuel Kieweg
Browse files

Merge branch '1-set-up-ci' into 'master'

Resolve "Set up CI"

Closes #1

See merge request !1
parents c4bfb1a6 03273998
No related branches found
No related tags found
1 merge request!1Resolve "Set up CI"
Pipeline #53058 passed with warnings
#!/bin/sh
for i in examples/*; do
echo "building $i"
go install github.com/bio-routing/bio-rd/$i
done
#!/bin/bash
result="$(gofmt -e -s -l . 2>&1 | grep -v '^vendor/' )"
if [ -n "$result" ]; then
echo "Go code is not formatted, run 'gofmt -e -s -w .'" >&2
echo "$result"
exit 1
else
echo "Go code is formatted well"
fi
# Golang CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-go/ for more details
version: 2
jobs:
build:
docker:
- image: circleci/golang:1.13
steps:
- checkout
- run: go test -v -cover -coverprofile=coverage.txt ./...
- run: bash <(curl -s https://codecov.io/bash)
- run: .circleci/build-examples
- run: .circleci/check-gofmt
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**Steps to Reproduce**
Give us clear and precise steps how to reproduce the bug.
**Expected behavior**
A clear and concise description of what you expected to happen.
**Configuration used**
Please show us your config, what settings did u used?
**Additional context**
Add any other context about the problem here.
variables:
SECURE_ANALYZERS_PREFIX: registry.gitlab.com/gitlab-org/security-products/analyzers
stages:
- test
test:cover:
image: golang:1.15
stage: test
script:
- go test -v -cover ./...
include:
# - local: '/build/ci/.code-quality-ci.yml'
- local: '/build/ci/.security-and-compliance-ci.yml'
code-quality-master:
stage: test
allow_failure: true
tags:
- baremetal
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script:
# writes golangci-lint output to gl-code-quality-report.json
- /home/gitlab-runner/go/bin/golangci-lint run --config build/ci/.golangci-config/.golangci-master.yml --out-format code-climate | tee gl-code-quality-report.json
artifacts:
reports:
codequality: gl-code-quality-report.json
paths:
- gl-code-quality-report.json
code-quality:
stage: test
allow_failure: true
tags:
- baremetal
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
script:
# writes golangci-lint output to gl-code-quality-report.json
- /home/gitlab-runner/go/bin/golangci-lint run --config build/ci/.golangci-config/.golangci.yml --out-format code-climate | tee gl-code-quality-report.json
artifacts:
reports:
codequality: gl-code-quality-report.json
paths:
- gl-code-quality-report.json
run:
timeout: 5m
issues-exit-code: 1
output:
format: code-climate
print-issued-lines: true
print-linter-name: true
uniq-by-line: true
path-prefix: ""
linters-settings:
gocyclo:
min-complexity: 15
golint:
min-confidence: 0.8
linters:
disable-all: true
enable:
- gofmt
- golint
- gocyclo
- govet
issues:
exclude-use-default: false
run:
timeout: 5m
issues-exit-code: 1
output:
format: code-climate
print-issued-lines: true
print-linter-name: true
uniq-by-line: true
path-prefix: ""
linters-settings:
gocyclo:
min-complexity: 15
golint:
min-confidence: 0.8
linters:
disable-all: true
enable:
- gofmt
- golint
- gocyclo
- govet
golangci-lint run\
--config .ci/.golangci-master.yml\
--out-format code-climate |\
jq -r '.[] | "\(.location.path):\(.location.lines.begin) \(.description)"'
sast:
variables:
SAST_ANALYZER_IMAGE_TAG: '2'
SAST_EXCLUDED_PATHS: spec, test, tests, tmp
SEARCH_MAX_DEPTH: '4'
include:
- template: Security/SAST.gitlab-ci.yml
- template: Dependency-Scanning.gitlab-ci.yml
- template: Security/License-Scanning.gitlab-ci.yml
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment