chore: add readme and changelog

This commit is contained in:
Raymond Tukpe
2022-08-16 16:37:38 +01:00
parent a8136ed2ad
commit a9061c4e03
3 changed files with 149 additions and 0 deletions

121
README.md Normal file
View File

@@ -0,0 +1,121 @@
# Typesense GitHub action
## Introduction
This GitHub Action starts a Typesense stand-alone server on the default port `8108`.
## Usage
```yaml
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/typesense-github-action@1.0.0
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 ./...
```
### Using Typesense on a Custom Port
You can start the Typesense instance on a custom port using the `typesense-port` input:
```yaml
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/typesense-github-action@1.0.0
with:
typesense-version: ${{ matrix.typesense-version }}
typesense-port: 20863
- name: …
```
### Using a Custom Container 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:
```yaml
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/typesense-github-action@1.0.0
with:
typesense-version: ${{ matrix.typesense-version }}
typesense-container-name: typesense-custom-name
- name: …
```
## License
MIT