[parser] .github: migrate ci to GitHub Actions (#1247)
This commit is contained in:
38
parser/.github/workflows/itcase.yml
vendored
Normal file
38
parser/.github/workflows/itcase.yml
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
name: Integration Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- release-5.0
|
||||
- release-4.0
|
||||
- release-3.0
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- release-5.0
|
||||
- release-4.0
|
||||
- release-3.0
|
||||
|
||||
jobs:
|
||||
test:
|
||||
# TODO: skip for now as resource limitation
|
||||
if: false
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: parser
|
||||
- name: setup go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.16
|
||||
- name: test
|
||||
run: |
|
||||
git clone https://github.com/pingcap/tidb.git
|
||||
cd tidb
|
||||
rm go.sum
|
||||
GO111MODULE=on go mod edit -replace github.com/pingcap/parser=$GITHUB_WORKSPACE/parser
|
||||
go mod tidy
|
||||
make gotest
|
||||
58
parser/.github/workflows/unittest.yml
vendored
Normal file
58
parser/.github/workflows/unittest.yml
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
name: Unit Test
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- release-5.0
|
||||
- release-4.0
|
||||
- release-3.0
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- release-5.0
|
||||
- release-4.0
|
||||
- release-3.0
|
||||
|
||||
jobs:
|
||||
generated:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: setup go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.16
|
||||
- name: validation
|
||||
run: |
|
||||
mv parser.go parser.go.committed
|
||||
make parser
|
||||
diff -u parser.go.committed parser.go
|
||||
|
||||
format:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: setup go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.16
|
||||
- name: format
|
||||
run: make fmt
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: setup go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.16
|
||||
- name: test
|
||||
run: make test
|
||||
- name: codecov
|
||||
uses: codecov/codecov-action@v1
|
||||
Reference in New Issue
Block a user