Skip to content

Commit

Permalink
Merge pull request #124 from austinvazquez/update-github-actions-work…
Browse files Browse the repository at this point in the history
…flow

Update GitHub actions CI workflow
  • Loading branch information
estesp authored Mar 9, 2023
2 parents 36fd7c3 + c7b5a32 commit 98b5f64
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 16 deletions.
39 changes: 26 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
pull_request:
branches: [ main ]

env:
GO_VERSION: 1.20.x

permissions:
contents: read
pull-requests: read
Expand All @@ -21,40 +24,49 @@ jobs:

strategy:
matrix:
go-version: [1.17]
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v3
with:
path: src/github.com/containerd/ttrpc

- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.45.0
version: v1.51.2
args: --timeout=5m
skip-cache: true
working-directory: src/github.com/containerd/ttrpc

- name: golangci-lint errors
run: golangci-lint run
working-directory: src/github.com/containerd/ttrpc
if: ${{ failure() }}

#
# Project checks
#
project:
name: Project Checks
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
timeout-minutes: 5

steps:
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: '1.17'
go-version: ${{ env.GO_VERSION }}

- uses: actions/checkout@v3
with:
path: src/github.com/containerd/ttrpc
fetch-depth: 25

- uses: containerd/project-checks@v1
- uses: containerd/project-checks@v1.1.0
with:
working-directory: src/github.com/containerd/ttrpc

Expand All @@ -66,14 +78,16 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
name: ${{ matrix.os }}
go: [1.19.x, 1.20.x]

name: ${{ matrix.os }} / ${{ matrix.go }}
runs-on: ${{ matrix.os }}
timeout-minutes: 5
steps:

- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: '1.17'
go-version: ${{ matrix.go }}

- name: Check out code
uses: actions/checkout@v3
Expand Down Expand Up @@ -101,14 +115,13 @@ jobs:
#
protobuild:
name: Run Protobuild
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:

- name: Set up Go 1.17
uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: ${{ env.GO_VERSION }}
id: go

- name: Setup Go binary path
Expand Down
2 changes: 0 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
linters:
enable:
- structcheck
- varcheck
- staticcheck
- unconvert
- gofmt
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ install-protobuild:
coverage: ## generate coverprofiles from the unit tests, except tests that require root
@echo "$(WHALE) $@"
@rm -f coverage.txt
@$(GO) test -i ${TESTFLAGS} ${TESTPACKAGES} 2> /dev/null
@$(GO) test ${TESTFLAGS} ${TESTPACKAGES} 2> /dev/null
@( for pkg in ${PACKAGES}; do \
$(GO) test ${TESTFLAGS} \
-cover \
Expand Down

0 comments on commit 98b5f64

Please sign in to comment.