refactor(search,bucket,sedefaults): better project structure #273
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Testing CI | |
on: | |
pull_request: | |
branches: ["*"] | |
paths: | |
- ".github/workflows/testingci.yml" # this file | |
- "go.mod" | |
- "go.sum" | |
- "Makefile" | |
- "generate/**/*" | |
- "src/**/*" | |
schedule: | |
- cron: "37 13 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: stable | |
- name: Generate go code from go:generate comments | |
run: make setup | |
# build | |
- name: Build project | |
run: make build | |
test: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
services: | |
redis: | |
image: redis | |
ports: | |
- 6379:6379 | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: stable | |
- name: Generate go code from go:generate comments | |
run: make setup | |
# test | |
- name: Test units (w/o engines & redis) | |
run: make test | |
# test-redis | |
- name: Test units (only redis) | |
run: make test-redis | |
env: | |
REDIS_HOST: localhost | |
REDIS_PORT: "6379" | |
test-engines: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: stable | |
- name: Generate go code from go:generate comments | |
run: make setup | |
# test-engines | |
- name: Test units (only engines) | |
run: make test-engines | |
lint: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: stable | |
- name: Generate go code from go:generate comments | |
run: make setup | |
# lint | |
- uses: golangci/golangci-lint-action@v3 | |
with: | |
version: latest | |
skip-pkg-cache: true | |
args: --timeout=5m |