Skip to content

Commit

Permalink
Update Github actions (uber-go#19)
Browse files Browse the repository at this point in the history
- Bump checkout/setup-go actions versions
- Drop pre-1.18 action
- Edit action permissions to readonly
  • Loading branch information
sywhang committed Jul 5, 2023
1 parent df24801 commit 06bbcf0
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
name: Run tests
on:
push:
branches: [main]
branches: ['*']
pull_request:
branches: [main]
branches: ['*']

permissions:
contents: read

env:
GO111MODULE: on

jobs:
test:
strategy:
Expand All @@ -16,12 +21,12 @@ jobs:
steps:

- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Vet and build
run: |
Expand All @@ -37,16 +42,10 @@ jobs:
./ci/test.sh
./ci/check_panic_handling.sh
- name: Run Go tests all
if: ${{ startsWith(matrix.go-version, '1.18') }}
- name: Run Tests
run: |
for i in $(find $PWD -name go.mod); do
pushd $(dirname $i)
go test ./...
popd
done
- name: Run Go tests some
if: ${{ startsWith(matrix.go-version, '1.18') == false }}
run: |
go test ./...

0 comments on commit 06bbcf0

Please sign in to comment.