Merge pull request #11 from GokselKUCUKSAHIN/feature/performance #37
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: Build️ And Test 🏗🧪 | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.18 | |
- name: Install dependencies | |
run: | | |
if grep -q "require" go.mod; then | |
echo "Dependencies found, installing..." | |
go get . | |
else | |
echo "No dependencies found, skipping dependency installation." | |
fi | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v4 | |
with: | |
version: v1.57.2 | |
args: -c .golangci.yml --timeout=2m -v | |
- name: Build | |
run: go build -v ./... | |
- name: Test | |
run: go test ./es/... -v -race -coverprofile=coverage.txt -covermode=atomic | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4.0.1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: GokselKUCUKSAHIN/es-query-builder |