fix(deps): update module github.com/go-playground/validator/v10 to v10.30.3 #89
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: CI/CD Pipeline | |
| permissions: | |
| contents: read | |
| packages: write | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| branches: [ main, master ] | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24' | |
| cache: true | |
| - name: Install dependencies | |
| run: make deps | |
| - name: Install golangci-lint | |
| run: make tools | |
| - name: Run linter | |
| run: make lint | |
| test-short: | |
| name: Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24' | |
| cache: true | |
| - name: Install dependencies | |
| run: make deps | |
| - name: Run short tests | |
| run: make test-short | |
| # test-integration: | |
| # name: Integration Tests | |
| # runs-on: ubuntu-latest | |
| # services: | |
| # postgres: | |
| # image: postgres:17-alpine | |
| # env: | |
| # POSTGRES_DB: resume_api_test | |
| # POSTGRES_USER: dev | |
| # POSTGRES_PASSWORD: devpass | |
| # POSTGRES_INITDB_ARGS: "--encoding=UTF8 --lc-collate=C --lc-ctype=C" | |
| # ports: | |
| # - 5433:5432 | |
| # options: >- | |
| # --health-cmd pg_isready | |
| # --health-interval 10s | |
| # --health-timeout 5s | |
| # --health-retries 5 | |
| # | |
| # steps: | |
| # - name: Checkout code | |
| # uses: actions/checkout@v4 | |
| # | |
| # - name: Set up Go | |
| # uses: actions/setup-go@v5 | |
| # with: | |
| # go-version: '1.23' | |
| # cache: true | |
| # | |
| # - name: Install dependencies | |
| # run: make deps | |
| # | |
| # - name: Run migrations | |
| # env: | |
| # TEST_DB_HOST: localhost | |
| # TEST_DB_PORT: 5433 | |
| # TEST_DB_NAME: resume_api_test | |
| # TEST_DB_USER: dev | |
| # TEST_DB_PASSWORD: devpass | |
| # DATABASE_URL: postgres://dev:devpass@localhost:5433/resume_api_test?sslmode=disable | |
| # run: go run ./cmd/migrate/main.go up | |
| # | |
| # - name: Run repository tests | |
| # env: | |
| # TEST_DB_HOST: localhost | |
| # TEST_DB_PORT: 5433 | |
| # TEST_DB_NAME: resume_api_test | |
| # TEST_DB_USER: dev | |
| # TEST_DB_PASSWORD: devpass | |
| # run: go test ./internal/repository/postgres/ -v -timeout=120s | |
| # | |
| # - name: Run integration tests | |
| # env: | |
| # TEST_DB_HOST: localhost | |
| # TEST_DB_PORT: 5433 | |
| # TEST_DB_NAME: resume_api_test | |
| # TEST_DB_USER: dev | |
| # TEST_DB_PASSWORD: devpass | |
| # run: go test ./internal/integration/... -v -timeout=120s | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| # needs: [lint, test-short, test-integration] | |
| needs: [lint, test-short] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24' | |
| cache: true | |
| - name: Install dependencies | |
| run: make deps | |
| - name: Build application | |
| run: make build | |
| - name: Set repository name to lowercase | |
| id: repo | |
| run: echo "name=${GITHUB_REPOSITORY,,}" >> $GITHUB_OUTPUT | |
| - name: Generate Docker metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: | | |
| ghcr.io/${{ steps.repo.outputs.name }} | |
| tags: | | |
| type=ref,event=branch | |
| type=ref,event=pr | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=semver,pattern={{major}} | |
| type=sha,prefix={{branch}}- | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| - name: Show generated tags | |
| run: echo "Generated tags:" && echo "${{ steps.meta.outputs.tags }}" | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GitHub Container Registry | |
| if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| platforms: linux/amd64,linux/arm64 | |
| push: ${{ github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |