2021-01-29 19:40:09 +00:00
|
|
|
name: CI
|
|
|
|
|
2021-01-29 20:42:19 +00:00
|
|
|
|
2021-01-29 19:40:09 +00:00
|
|
|
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
|
2021-01-29 20:38:04 +00:00
|
|
|
COMMIT_RANGE: ${{ github.event_name == 'pull_request' && format('{0}..{1}',github.event.pull_request.base.sha, github.event.pull_request.head.sha) || format('{0}..{1}', github.event.before, github.event.after) }}
|
2021-01-29 19:40:09 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
2020-08-24 11:18:39 +00:00
|
|
|
path: src/github.com/distribution/distribution
|
2021-01-29 19:40:09 +00:00
|
|
|
fetch-depth: 50
|
|
|
|
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
2020-08-22 02:04:11 +00:00
|
|
|
go-version: 1.15.*
|
2021-01-29 19:40:09 +00:00
|
|
|
|
|
|
|
- name: Dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get -q update
|
2021-03-23 10:04:14 +00:00
|
|
|
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install python2-minimal
|
2021-01-29 19:40:09 +00:00
|
|
|
cd /tmp && go get -u github.com/vbatts/git-validation
|
|
|
|
|
|
|
|
- name: Build
|
2020-08-24 11:18:39 +00:00
|
|
|
working-directory: ./src/github.com/distribution/distribution
|
2021-01-29 19:40:09 +00:00
|
|
|
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:
|
2020-08-24 11:18:39 +00:00
|
|
|
directory: ./src/github.com/distribution/distribution
|