2021-01-29 20:40:09 +01:00
|
|
|
name: CI
|
|
|
|
|
2021-01-29 21:42:19 +01:00
|
|
|
|
2021-01-29 20:40:09 +01: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 21:38:04 +01: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 20:40:09 +01:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
2020-08-24 13:18:39 +02:00
|
|
|
path: src/github.com/distribution/distribution
|
2021-01-29 20:40:09 +01:00
|
|
|
fetch-depth: 50
|
|
|
|
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
2020-08-22 04:04:11 +02:00
|
|
|
go-version: 1.15.*
|
2021-01-29 20:40:09 +01:00
|
|
|
|
|
|
|
- name: Dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get -q update
|
2021-03-23 11:04:14 +01:00
|
|
|
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install python2-minimal
|
2021-01-29 20:40:09 +01:00
|
|
|
cd /tmp && go get -u github.com/vbatts/git-validation
|
|
|
|
|
|
|
|
- name: Build
|
2020-08-24 13:18:39 +02:00
|
|
|
working-directory: ./src/github.com/distribution/distribution
|
2021-01-29 20:40:09 +01: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 13:18:39 +02:00
|
|
|
directory: ./src/github.com/distribution/distribution
|