diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..f9a149b --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +# Changelog + +## v1.0.0 + +### Added + +- Release `v1.0.0` diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..97a294c --- /dev/null +++ b/LICENSE @@ -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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..0d3071f --- /dev/null +++ b/README.md @@ -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