This GitHub Action starts a Typesense stand-alone server on the default port 8108
.
name: Run tests
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.16.x, 1.17.x]
typesense-version: [0.22.0, 0.23.1]
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Start Typesense
uses: jirevwe/[email protected]
with:
typesense-version: ${{ matrix.typesense-version }}
typesense-api-key: some-api-key
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Cache go modules
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
restore-keys: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
- name: Check out code
uses: actions/checkout@v2
- name: Get and verify dependencies
run: go mod download && go mod verify
- name: Build app to make sure there are zero issues
run: go build -o convoy ./cmd
- name: Go vet
run: go vet ./...
- name: Run tests
run: go test -v ./...
You can start the Typesense instance on a custom port using the typesense-port
input:
name: Run tests
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.16.x, 1.17.x]
typesense-version: [0.22.0, 0.23.1]
steps:
- name: Start Typesense
uses: jirevwe/[email protected]
with:
typesense-version: ${{ matrix.typesense-version }}
typesense-port: 20863
- name: …
This GitHub Action provides a Typesense Docker container. The default container name is typesense
. It can be helpful to customize the container name. For example, when running multiple Typesense instances in parallel. You can customize the container name using the typesense-container-name
input:
name: Run tests
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.16.x, 1.17.x]
typesense-version: [0.22.0, 0.23.1]
steps:
- name: Start Typesense
uses: jirevwe/[email protected]
with:
typesense-version: ${{ matrix.typesense-version }}
typesense-container-name: typesense-custom-name
- name: …
MIT