Skip to content

manual cherry-pick of #6343 (#6346) #22220

manual cherry-pick of #6343 (#6346)

manual cherry-pick of #6343 (#6346) #22220

Workflow file for this run

# Copyright (c) 2021 Terminus, Inc.
#
# This program is free software: you can use, redistribute, and/or modify
# it under the terms of the GNU Affero General Public License, version 3
# or later ("AGPL"), as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
name: CI AND IT
on:
push:
tags:
- v*
branches:
- develop
- master
- release/*
pull_request:
jobs:
CI:
runs-on: ubuntu-latest
container:
image: letmein7788/letmein:golangci-lint
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Tools
run: apk add tar
- name: Go Build Cache
uses: actions/cache@v2
env:
action-name: build
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ env.action-name }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Go generate files
run: make prepare
- name: Run Build
run: make GO_BUILD_OPTIONS="-tags=musl"
CODE-CHECK:
runs-on: ubuntu-latest
container:
image: letmein7788/letmein:golangci-lint
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Tools
run: apk add tar
- name: Go generate files
run: make prepare
- name: Check Go Imports
run: make check-imports
- name: Run SQL Lint
run: make miglint
- name: Run Go Lint
uses: golangci/golangci-lint-action@v2.5.2
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.29
# Optional: working directory, useful for monorepos
# working-directory: somedir
# Optional: golangci-lint command line arguments.
args: --timeout=10m
# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true
# Optional: if set to true then the action will use pre-installed Go.
skip-go-installation: true
# Optional: if set to true then the action don't cache or restore ~/go/pkg.
skip-pkg-cache: false
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
skip-build-cache: false
CODE-TEST:
runs-on: ubuntu-latest
container:
image: letmein7788/letmein:golangci-lint
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Tools
run: apk add tar
- name: Test Cache
uses: actions/cache@v2
with:
path: |
~/.cache/go-test
key: ${{ runner.os }}-go-test-${{ hashFiles('**/*.go', '**/*.s', '**/*.c', '**/*.h', '**/*.cpp') }}
restore-keys: |
${{ runner.os }}-go-test-
- name: Go generate files
run: make prepare
- name: Run Test
env:
GOLANG_PROTOBUF_REGISTRATION_CONFLICT: ignore
run: |
make run-test
curl -s https://codecov.io/bash | bash