Skip to content

Commit

Permalink
test: add gha ci
Browse files Browse the repository at this point in the history
Let's see if I remember how to yaml
  • Loading branch information
schmichael committed Aug 5, 2024
1 parent 7bea36e commit e9a4163
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
41 changes: 41 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI Tests
on:
pull_request:
paths-ignore:
- 'README.md'
push:
branches:
- 'master'
paths-ignore:
- 'README.md'

permissions:
contents: read

jobs:
go-fmt-and-vet:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version: '1.20'
cache: true
- run: |
files=$(go fmt ./...)
if [ -n "$files" ]; then
echo "The following file(s) do not conform to go fmt:"
echo "$files"
exit 1
fi
go-test:
needs: go-fmt-and-vet
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version: '1.20'
cache: true
- run: |
go test -race ./...
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/hashicorp/yamux

go 1.15
go 1.20
Empty file added go.sum
Empty file.

0 comments on commit e9a4163

Please sign in to comment.