This repository has been archived by the owner on Mar 10, 2024. It is now read-only.
Bump google.golang.org/grpc from 1.45.0 to 1.53.0 in /cosign-ecs-function #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go tests | |
on: | |
workflow_dispatch: | |
push: | |
branches: ['main'] | |
pull_request: | |
permissions: read-all | |
jobs: | |
unit-tests: | |
name: Run unit tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest] | |
steps: | |
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 #v2.4.0 | |
with: | |
ssh-key: ${{ secrets.BLOG_SECRET_KEY }} | |
# https://github.com/mvdan/github-actions-golang#how-do-i-set-up-caching-between-builds | |
- uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed #v2.1.7 | |
with: | |
# In order: | |
# * Module download cache | |
# * Build cache (Linux) | |
# * Build cache (Mac) | |
# * Build cache (Windows) | |
path: | | |
~/go/pkg/mod | |
~/.cache/go-build | |
~/Library/Caches/go-build | |
%LocalAppData%\go-build | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- uses: actions/setup-go@424fc82d43fa5a37540bae62709ddcc23d9520d4 #v2.1.5 | |
with: | |
go-version: '1.17.x' | |
- name: Run Go tests | |
run: cd cosign-ecs-function && go test ./... | |
golangci: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 #v2.4.0 | |
with: | |
ssh-key: ${{ secrets.BLOG_SECRET_KEY }} | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@5c56cd6c9dc07901af25baab6f2b0d9f3b7c3018 #v2.5.2 | |
timeout-minutes: 5 | |
with: | |
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. | |
version: latest | |
working-directory: cosign-ecs-function | |
args: --timeout 3m0s |