Skip to content

Commit

Permalink
Added a test GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
levb committed Dec 5, 2023
1 parent f0bfd98 commit 3fc08dd
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Test with nats-server
on: [push, pull_request]

jobs:
test:
env:
# GOPATH: /home/runner/work/nats-server
GO111MODULE: "on"
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.21

- name: Checkout code
uses: actions/checkout@v4
with:
path: $GOPATH/src/github.com/ConnectEverything/mqtt-test

- name: Checkout nats-server
uses: actions/checkout@v4
with:
repository: nats-io/nats-server
path: $GOPATH/src/github.com/nats-io/nats-server

- name: Build and install
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
cd $GOPATH/src/github.com/ConnectEverything/mqtt-test
go install -v
- name: Run 'MQTTEx from nats-server'
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
cd $GOPATH/src/github.com/nats-io/nats-server
go test -v --run='-' --bench 'MQTTEx' --benchtime=100x ./server | tee /tmp/current-bench-result.txt

0 comments on commit 3fc08dd

Please sign in to comment.