ci: move test step to build workflow and remove ci workflow
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
1a905ab966
commit
7e546784a4
2 changed files with 29 additions and 49 deletions
29
.github/workflows/build.yml
vendored
29
.github/workflows/build.yml
vendored
|
@ -15,8 +15,37 @@ env:
|
||||||
DOCKERHUB_SLUG: distribution/distribution
|
DOCKERHUB_SLUG: distribution/distribution
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
go:
|
||||||
|
- 1.17
|
||||||
|
- 1.18
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
-
|
||||||
|
name: Set up Go
|
||||||
|
uses: actions/setup-go@v3
|
||||||
|
with:
|
||||||
|
go-version: ${{ matrix.go }}
|
||||||
|
-
|
||||||
|
name: Test
|
||||||
|
run: |
|
||||||
|
make coverage
|
||||||
|
-
|
||||||
|
name: Codecov
|
||||||
|
uses: codecov/codecov-action@v3
|
||||||
|
with:
|
||||||
|
directory: ./
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- test
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
|
|
49
.github/workflows/ci.yml
vendored
49
.github/workflows/ci.yml
vendored
|
@ -1,49 +0,0 @@
|
||||||
name: CI
|
|
||||||
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
build:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
go-version: ["1.17.x", "1.18.x"]
|
|
||||||
platform: ["ubuntu-latest"]
|
|
||||||
runs-on: ${{ matrix.platform }}
|
|
||||||
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) || format('{0}..{1}', github.event.before, github.event.after) }}
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
path: src/github.com/distribution/distribution
|
|
||||||
fetch-depth: 50
|
|
||||||
|
|
||||||
- name: Set up Go
|
|
||||||
uses: actions/setup-go@v2
|
|
||||||
with:
|
|
||||||
go-version: ${{ matrix.go-version }}
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
working-directory: ./src/github.com/distribution/distribution
|
|
||||||
run: |
|
|
||||||
go build -i .
|
|
||||||
make build
|
|
||||||
make binaries
|
|
||||||
if [ "$GOOS" = "linux" ]; then make coverage ; fi
|
|
||||||
|
|
||||||
- uses: codecov/codecov-action@v1
|
|
||||||
with:
|
|
||||||
directory: ./src/github.com/distribution/distribution
|
|
Loading…
Reference in a new issue