Remove travis and move to github workflow (#4267)

Add github testing workflow, simplify the Makefile because that was
complex because of Travis. Remove the fuzzing, needs to be re-added when
that works properly with go modules (it has been disabled for quite some
time). Multiple builds and files have been added so these tests can all
run in parallel. Our testing now tests a couple of minutes, the codeql
is by far the more expensive.

Move metric's naming test to test/presubmit_test.go

Add longer sleep in the TestAutoAXFR.

Bye bye travis!

Closes: #4266

Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
Miek Gieben
2020-11-06 14:14:26 +01:00
committed by GitHub
parent 049369583b
commit cd5ee7d1f0
9 changed files with 117 additions and 130 deletions

View File

@@ -1,16 +1,9 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"
on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '22 10 * * 4'
@@ -24,39 +17,18 @@ jobs:
fail-fast: false
matrix:
language: [ 'go' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

28
.github/workflows/go.coverage.yml vendored Normal file
View File

@@ -0,0 +1,28 @@
name: Go Coverage
on: [push, pull_request]
jobs:
test:
name: Coverage
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.15
id: go
- name: Check out code
uses: actions/checkout@v2
- name: Build
run: go build -v ./...
- name: Test With Coverage
run: |
for d in request core coremain plugin test; do \
( cd $d; go test -coverprofile=cover.out -covermode=atomic -race ./...; [ -f cover.out ] && cat cover.out >> ../coverage.txt ); \
done
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1

67
.github/workflows/go.test.yml vendored Normal file
View File

@@ -0,0 +1,67 @@
name: Go Tests
on: [push, pull_request]
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.15
id: go
- name: Check out code
uses: actions/checkout@v2
- name: Build
run: go build -v ./...
- name: Test
run: |
( cd request; go test -race ./... )
( cd core; go test -race ./... )
( cd coremain; go test -race ./... )
test-plugins:
name: Test Plugins
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.15
id: go
- name: Check out code
uses: actions/checkout@v2
- name: Build
run: go build -v ./...
- name: Test
run: ( cd plugin; go test -race ./... )
test-e2e:
name: Test e2e
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.15
id: go
- name: Check out code
uses: actions/checkout@v2
- name: Build
run: go build -v ./...
- name: Test
run: |
go install github.com/fatih/faillint
( cd test; go test -race ./... )

View File

@@ -1,4 +1,4 @@
name: go tidy
name: Go Tidy
on:
push:

View File

@@ -1,4 +1,4 @@
name: make doc
name: Make Doc
on:
push: