Update CI project checks to use containerd project action
Signed-off-by: Derek McGowan <derek@mcg.dev>
This commit is contained in:
95
.github/workflows/ci.yml
vendored
95
.github/workflows/ci.yml
vendored
@@ -7,7 +7,56 @@ on:
|
|||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
#
|
||||||
|
# golangci-lint
|
||||||
|
#
|
||||||
|
linters:
|
||||||
|
name: Linters
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
timeout-minutes: 10
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
go-version: [1.17]
|
||||||
|
os: [ubuntu-18.04, macos-10.15, windows-2019]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: ${{ matrix.go-version }}
|
||||||
|
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: golangci/golangci-lint-action@v2
|
||||||
|
with:
|
||||||
|
version: v1.42.0
|
||||||
|
args: --timeout=5m
|
||||||
|
skip-go-installation: true
|
||||||
|
|
||||||
|
#
|
||||||
|
# Project checks
|
||||||
|
#
|
||||||
|
project:
|
||||||
|
name: Project Checks
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
timeout-minutes: 5
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: '1.17'
|
||||||
|
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
path: src/github.com/containerd/ttrpc
|
||||||
|
fetch-depth: 25
|
||||||
|
|
||||||
|
- uses: containerd/project-checks@v1
|
||||||
|
with:
|
||||||
|
working-directory: src/github.com/containerd/ttrpc
|
||||||
|
|
||||||
|
#
|
||||||
|
# Build and Test project
|
||||||
|
#
|
||||||
build:
|
build:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -18,17 +67,9 @@ jobs:
|
|||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Set up Go 1.15
|
- uses: actions/setup-go@v2
|
||||||
uses: actions/setup-go@v2
|
|
||||||
with:
|
with:
|
||||||
go-version: 1.15
|
go-version: '1.17'
|
||||||
id: go
|
|
||||||
|
|
||||||
- name: Setup Go binary path
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
|
|
||||||
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
|
|
||||||
|
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
@@ -36,37 +77,6 @@ jobs:
|
|||||||
path: src/github.com/containerd/ttrpc
|
path: src/github.com/containerd/ttrpc
|
||||||
fetch-depth: 25
|
fetch-depth: 25
|
||||||
|
|
||||||
- name: Checkout project
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
repository: containerd/project
|
|
||||||
path: src/github.com/containerd/project
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
env:
|
|
||||||
GO111MODULE: off
|
|
||||||
run: |
|
|
||||||
go get -u github.com/vbatts/git-validation
|
|
||||||
go get -u github.com/kunalkushwaha/ltag
|
|
||||||
|
|
||||||
- name: Check DCO/whitespace/commit message
|
|
||||||
env:
|
|
||||||
GITHUB_COMMIT_URL: ${{ github.event.pull_request.commits_url }}
|
|
||||||
DCO_VERBOSITY: "-q"
|
|
||||||
DCO_RANGE: ""
|
|
||||||
working-directory: src/github.com/containerd/ttrpc
|
|
||||||
run: |
|
|
||||||
if [ -z "${GITHUB_COMMIT_URL}" ]; then
|
|
||||||
DCO_RANGE=$(jq -r '.before +".."+ .after' ${GITHUB_EVENT_PATH})
|
|
||||||
else
|
|
||||||
DCO_RANGE=$(curl ${GITHUB_COMMIT_URL} | jq -r '.[0].parents[0].sha +".."+ .[-1].sha')
|
|
||||||
fi
|
|
||||||
../project/script/validate/dco
|
|
||||||
|
|
||||||
- name: Check file headers
|
|
||||||
run: ../project/script/validate/fileheader ../project/
|
|
||||||
working-directory: src/github.com/containerd/ttrpc
|
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
working-directory: src/github.com/containerd/ttrpc
|
working-directory: src/github.com/containerd/ttrpc
|
||||||
run: |
|
run: |
|
||||||
@@ -76,6 +86,9 @@ jobs:
|
|||||||
run: bash <(curl -s https://codecov.io/bash)
|
run: bash <(curl -s https://codecov.io/bash)
|
||||||
working-directory: src/github.com/containerd/ttrpc
|
working-directory: src/github.com/containerd/ttrpc
|
||||||
|
|
||||||
|
#
|
||||||
|
# Run Protobuild
|
||||||
|
#
|
||||||
protobuild:
|
protobuild:
|
||||||
name: Run Protobuild
|
name: Run Protobuild
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
|||||||
Reference in New Issue
Block a user