Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3347 from wy65701436/release/2.7-cp-ci
[backport release/2.7] First draft of actions based ci
- Loading branch information
Showing
2 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
DOCKER_BUILDTAGS: "include_oss include_gcs" | ||
CGO_ENABLED: 1 | ||
GO111MODULE: "auto" | ||
GOPATH: ${{ github.workspace }} | ||
GOOS: linux | ||
COMMIT_RANGE: ${{ github.event_name == 'pull_request' && format('{0}..{1}',github.event.pull_request.base.sha, github.event.pull_request.head.sha) || github.sha }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
path: src/github.com/docker/distribution | ||
fetch-depth: 50 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.14.* | ||
|
||
- name: Dependencies | ||
run: | | ||
sudo apt-get -q update | ||
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install python-minimal | ||
cd /tmp && go get -u github.com/vbatts/git-validation | ||
- name: Build | ||
working-directory: ./src/github.com/docker/distribution | ||
run: | | ||
DCO_VERBOSITY=-q script/validate/dco | ||
GO111MODULE=on script/setup/install-dev-tools | ||
script/validate/vendor | ||
go build -i . | ||
make check | ||
make build | ||
make binaries | ||
if [ "$GOOS" = "linux" ]; then make coverage ; fi | ||
- uses: codecov/codecov-action@v1 | ||
with: | ||
directory: ./src/github.com/docker/distribution |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters