
* build/install * all branches * e2e test * goc binary PATH add checkout code add +x test github action test for github action test for github actions test for github actions test for github actions fix ci fix fix temp path error * go1.11 1.10 not support go env command fix * fix build dir error for go 1.11/1.12 mod project * e2e test test test fix yaml syntax error fix fix fix * fix env error fix fix * add unit test * add unit test coverage report update update * add license
63 lines
1.5 KiB
YAML
63 lines
1.5 KiB
YAML
name: e2e test
|
|
on:
|
|
# Trigger the workflow on push or pull request,
|
|
# but only for the master branch
|
|
push:
|
|
paths-ignore:
|
|
- '**.md'
|
|
pull_request:
|
|
paths-ignore:
|
|
- '**.md'
|
|
jobs:
|
|
job_1:
|
|
name: Build goc binary
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.14.x
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
- name: Go build
|
|
run: |
|
|
cd cmd/goc
|
|
go build
|
|
- name: Go build test binary
|
|
run: |
|
|
cd tests/e2e
|
|
go get -u github.com/onsi/ginkgo/ginkgo
|
|
ginkgo build ./...
|
|
- name: Upload binary result for job 1
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: goc
|
|
path: cmd/goc/goc
|
|
- name: Upload binary result for job 1
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: e2e.test
|
|
path: tests/e2e/e2e.test
|
|
|
|
job_2:
|
|
name: E2E test
|
|
needs: job_1
|
|
strategy:
|
|
matrix:
|
|
go-version: [1.11.x, 1.12.x, 1.13.x, 1.14.x]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
- name: Download built binary
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
path: /home/runner/tools
|
|
- name: Do test
|
|
run: |
|
|
cd tests
|
|
./run-ci-actions.sh |