Skip to content

Commit

Permalink
Update ci.yml (#340)
Browse files Browse the repository at this point in the history
Revoke default permissions.
Grant minimum required permission for CI job.
Add Go version to test names:  name: test ${{matrix.os}} go-${{ matrix.go-version }}
  • Loading branch information
x448 committed May 15, 2022
1 parent 33643a4 commit 8988cfe
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
# https://github.com/fxamacker/cbor/workflows/ci.yml
# See ci-go-cover.yml for coverage and safer-golangci-lint.yml for linting.
name: ci

# Revoke default permissions.
permissions: {}

on:
workflow_dispatch:
pull_request:
Expand All @@ -14,8 +18,10 @@ on:
jobs:
# Test on various OS with default Go version.
tests:
name: Test on ${{matrix.os}}
name: test ${{matrix.os}} go-${{ matrix.go-version }}
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
Expand All @@ -25,6 +31,7 @@ jobs:
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
check-latest: true

- name: Checkout code
uses: actions/checkout@v3
Expand Down

0 comments on commit 8988cfe

Please sign in to comment.