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:
|
2021-08-10 09:45:30 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-05-05 08:20:56 +00:00
|
|
|
go-version: ["1.17.x", "1.18.x"]
|
2021-08-10 09:45:30 +00:00
|
|
|
platform: ["ubuntu-latest"]
|
|
|
|
runs-on: ${{ matrix.platform }}
|
2021-01-29 19:40:09 +00:00
|
|
|
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:
|
2021-08-10 09:45:30 +00:00
|
|
|
go-version: ${{ matrix.go-version }}
|
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-07-06 03:43:13 +00:00
|
|
|
cd /tmp && go install github.com/vbatts/git-validation@latest
|
2021-01-29 19:40:09 +00:00
|
|
|
|
|
|
|
- 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
|
|
|
|
go build -i .
|
|
|
|
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
|