Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move some checks from Jenkins job to Github Actions #1690

Merged
merged 1 commit into from
Feb 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: ci

on:
pull_request:
branches:
- master
- release-*

jobs:

pull:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- "check-setup check"
- "docker e2e-docker cli"
- "test GOFLAGS=-race"
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v1
with:
fetch-depth: 1
path: go/src/github.com/pingcap/tidb-operator

- name: make ${{ matrix.target }}
run: |
# workaround for https://github.com/actions/setup-go/issues/14
export GOPATH=/home/runner/work/tidb-operator/go
export PATH=$PATH:$GOPATH/bin
make $target
env:
target: ${{ matrix.target }}
25 changes: 13 additions & 12 deletions ci/pingcap_tidb_operator_build_kind.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -191,16 +191,17 @@ def call(BUILD_BRANCH, CREDENTIALS_ID, CODECOV_CREDENTIALS_ID) {
}
}

stage("Check") {
ansiColor('xterm') {
sh """
export GOPATH=${WORKSPACE}/go
export PATH=${WORKSPACE}/go/bin:\$PATH
make check-setup
make check
"""
}
}
// moved to Github Actions
// stage("Check") {
// ansiColor('xterm') {
// sh """
// export GOPATH=${WORKSPACE}/go
// export PATH=${WORKSPACE}/go/bin:\$PATH
// make check-setup
// make check
// """
// }
// }

stage("Build and Test") {
ansiColor('xterm') {
Expand All @@ -209,10 +210,10 @@ def call(BUILD_BRANCH, CREDENTIALS_ID, CODECOV_CREDENTIALS_ID) {
make e2e-build
if [ ${BUILD_BRANCH} == "master" ]
then
make test GO_COVER=y
make test GOFLAGS='-race' GO_COVER=y
curl -s https://codecov.io/bash | bash -s - -t ${CODECOV_TOKEN} || echo 'Codecov did not collect coverage reports'
else
make test
make test GOFLAGS='-race'
fi
"""
}
Expand Down