-
Notifications
You must be signed in to change notification settings - Fork 499
106 lines (103 loc) · 3.7 KB
/
dest_meilisearch.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Destination Plugin Meilisearch Workflow
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
paths:
- plugins/destination/meilisearch/**
- .github/workflows/dest_meilisearch.yml
push:
branches:
- main
paths:
- plugins/destination/meilisearch/**
- .github/workflows/dest_meilisearch.yml
jobs:
plugins-destination-meilisearch:
name: "plugins/destination/meilisearch"
runs-on: ubuntu-latest
timeout-minutes: 30
env:
MEILI_MASTER_KEY: test
defaults:
run:
working-directory: plugins/destination/meilisearch
services:
meilisearch:
image: getmeili/meilisearch:v1.5.1
env:
MEILI_ENV: development
MEILI_MASTER_KEY: ${{ env.MEILI_MASTER_KEY }}
MEILI_NO_ANALYTICS: true
MEILI_LOG_LEVEL: WARN
ports:
- 7700:7700
options: >-
--health-cmd "wget --no-verbose --tries=1 --spider http://localhost:7700/health || exit 1"
--health-interval 60s
--health-timeout 30s
--health-start-period 20s
--health-retries 5
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
go-version-file: plugins/destination/meilisearch/go.mod
cache: true
cache-dependency-path: plugins/destination/meilisearch/go.sum
- name: golangci-lint
uses: cloudquery/golangci-lint-action@master
with:
version: v1.55.2
working-directory: plugins/destination/meilisearch
args: "--config ../../.golangci.yml"
skip-pkg-cache: true
skip-build-cache: true
- run: go mod tidy
- name: Build
run: go build .
- name: Test Meilisearch
env:
CQ_DEST_MEILI_TEST_HOST: "http://localhost:7700"
CQ_DEST_MEILI_TEST_API_KEY: ${{ env.MEILI_MASTER_KEY }}
run: make test
validate-release:
timeout-minutes: 30
runs-on: ubuntu-latest
env:
CGO_ENABLED: 0
steps:
- name: Checkout
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
uses: actions/checkout@v4
- uses: actions/cache@v3
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-1.21.1-release-cache-${{ hashFiles('plugins/destination/meilisearch/go.sum') }}
restore-keys: |
${{ runner.os }}-go-1.21.1-release-cache-plugins-destination-meilisearch
- name: Set up Go
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
uses: actions/setup-go@v4
with:
go-version-file: plugins/destination/meilisearch/go.mod
cache: false
- name: Install GoReleaser
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser-pro
version: latest
install-only: true
- name: Run GoReleaser Dry-Run
if: startsWith(github.head_ref, 'release-please--branches--main--components') || github.event_name == 'push'
run: goreleaser release --snapshot --rm-dist --skip=validate,publish,sign -f ./plugins/destination/meilisearch/.goreleaser.yaml
env:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}