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

7
CHANGELOG.md Normal file
View File

@@ -0,0 +1,7 @@
# Changelog
## v1.0.0
### Added
- Release `v1.0.0`

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2022 Raymond Tukpe
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

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