Use GitHub Actions for CI
This is mostly a copy of the workflow from the github.com/containerd/typeurl repository. After this we can remove travis. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
		
							
								
								
									
										73
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										73
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,73 @@ | |||||||
|  | name: CI | ||||||
|  |  | ||||||
|  | on: | ||||||
|  |   push: | ||||||
|  |     branches: [ master ] | ||||||
|  |   pull_request: | ||||||
|  |     branches: [ master ] | ||||||
|  |  | ||||||
|  | jobs: | ||||||
|  |  | ||||||
|  |   build: | ||||||
|  |     name: TTRPC CI | ||||||
|  |     runs-on: ubuntu-18.04 | ||||||
|  |     timeout-minutes: 5 | ||||||
|  |     steps: | ||||||
|  |  | ||||||
|  |     - name: Set up Go 1.15 | ||||||
|  |       uses: actions/setup-go@v2 | ||||||
|  |       with: | ||||||
|  |         go-version: 1.15 | ||||||
|  |       id: go | ||||||
|  |  | ||||||
|  |     - name: Setup Go binary path | ||||||
|  |       shell: bash | ||||||
|  |       run: | | ||||||
|  |         echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV | ||||||
|  |         echo "${{ github.workspace }}/bin" >> $GITHUB_PATH | ||||||
|  |  | ||||||
|  |     - name: Check out code | ||||||
|  |       uses: actions/checkout@v2 | ||||||
|  |       with: | ||||||
|  |         path: src/github.com/containerd/ttrpc | ||||||
|  |         fetch-depth: 25 | ||||||
|  |  | ||||||
|  |     - name: Checkout project | ||||||
|  |       uses: actions/checkout@v2 | ||||||
|  |       with: | ||||||
|  |         repository: containerd/project | ||||||
|  |         path: src/github.com/containerd/project | ||||||
|  |  | ||||||
|  |     - name: Install dependencies | ||||||
|  |       env: | ||||||
|  |         GO111MODULE: off | ||||||
|  |       run: | | ||||||
|  |         go get -u github.com/vbatts/git-validation | ||||||
|  |         go get -u github.com/kunalkushwaha/ltag | ||||||
|  |  | ||||||
|  |     - name: Check DCO/whitespace/commit message | ||||||
|  |       env: | ||||||
|  |         GITHUB_COMMIT_URL: ${{ github.event.pull_request.commits_url }} | ||||||
|  |         DCO_VERBOSITY: "-q" | ||||||
|  |         DCO_RANGE: "" | ||||||
|  |       working-directory: src/github.com/containerd/ttrpc | ||||||
|  |       run: | | ||||||
|  |         if [ -z "${GITHUB_COMMIT_URL}" ]; then | ||||||
|  |           DCO_RANGE=$(jq -r '.before +".."+ .after' ${GITHUB_EVENT_PATH}) | ||||||
|  |         else | ||||||
|  |           DCO_RANGE=$(curl ${GITHUB_COMMIT_URL} | jq -r '.[0].parents[0].sha +".."+ .[-1].sha') | ||||||
|  |         fi | ||||||
|  |         ../project/script/validate/dco | ||||||
|  |  | ||||||
|  |     - name: Check file headers | ||||||
|  |       run: ../project/script/validate/fileheader ../project/ | ||||||
|  |       working-directory: src/github.com/containerd/ttrpc | ||||||
|  |  | ||||||
|  |     - name: Test | ||||||
|  |       working-directory: src/github.com/containerd/ttrpc | ||||||
|  |       run: | | ||||||
|  |         go test -v -race -coverprofile=coverage.txt -covermode=atomic ./... | ||||||
|  |  | ||||||
|  |     - name: Codecov | ||||||
|  |       run: bash <(curl -s https://codecov.io/bash) | ||||||
|  |       working-directory: src/github.com/containerd/ttrpc | ||||||
| @@ -1,5 +1,6 @@ | |||||||
| # ttrpc | # ttrpc | ||||||
|  |  | ||||||
|  | [](https://github.com/containerd/ttrpc/actions?query=workflow%3ACI) | ||||||
| [](https://travis-ci.org/containerd/ttrpc) | [](https://travis-ci.org/containerd/ttrpc) | ||||||
|  |  | ||||||
| GRPC for low-memory environments. | GRPC for low-memory environments. | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Sebastiaan van Stijn
					Sebastiaan van Stijn