Migrate to new JetStream API, update linter settings, use go 1.22 #38
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 | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
nats: | |
image: nats:alpine | |
ports: | |
- 4222:4222 | |
steps: | |
- name: Enable NATS JetStream | |
run: | | |
docker exec ${{ job.services.nats.id }} ash -c 'echo "jetstream {}" > /etc/nats/nats-server.conf' | |
docker restart ${{ job.services.nats.id }} | |
- uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '1.2.x' | |
- name: Test | |
env: | |
NATS_URL: "nats://localhost:4222" | |
run: go test -v ./... | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-go-version: '1.22.x' | |
- name: Build | |
run: go build -v ./... |