Release v1.1.0 #6
This file contains hidden or 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: Tests | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:15 | |
| env: | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: lucendex_test | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.25' | |
| - name: Download dependencies | |
| working-directory: ./backend | |
| run: go mod download | |
| - name: Run unit tests | |
| working-directory: ./backend | |
| run: go test ./... -v -coverprofile=coverage.out | |
| - name: Run race detector tests | |
| working-directory: ./backend | |
| run: go test ./... -race | |
| - name: Generate coverage report | |
| working-directory: ./backend | |
| run: go tool cover -func=coverage.out | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: ./backend/coverage.out | |
| fail_ci_if_error: false | |
| security: | |
| name: Security Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.25' | |
| - name: Download dependencies | |
| working-directory: ./backend | |
| run: go mod download | |
| - name: Run security tests | |
| working-directory: ./backend | |
| run: | | |
| go test ./internal/api/... -v | |
| go test ./internal/router/... -v |