Per-page configuration (first two consumers) #354
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
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| container: golang:1.25-alpine | |
| env: | |
| ENVIRONMENT: ci | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - run: apk update && apk add curl openssl git openssh-client build-base && mkdir -p /root/.ssh | |
| - uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0 | |
| if: github.ref != 'refs/heads/master' | |
| with: | |
| version: latest | |
| args: --timeout=5m --tests=false ./... | |
| test: | |
| runs-on: ubuntu-latest | |
| container: golang:1.25-alpine | |
| services: | |
| postgres: | |
| image: postgres:latest | |
| env: | |
| POSTGRES_PASSWORD: test | |
| POSTGRES_HOST_AUTH_METHOD: trust | |
| env: | |
| ENVIRONMENT: ci | |
| DB_DB: money | |
| DB_HOST: postgres | |
| DB_USER: postgres | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - run: apk update && apk add curl openssl git openssh-client build-base bash gpg && mkdir -p /root/.ssh | |
| - run: wget -O /usr/bin/mockgen https://github.com/skynet2/mock/releases/latest/download/mockgen && chmod 777 /usr/bin/mockgen | |
| - run: make generate | |
| - run: ENVIRONMENT=ci go test -json -coverprofile=/root/coverage_temp.txt -covermode=atomic ./... > /root/test.json | |
| - run: cat /root/coverage_temp.txt | grep -v "_mock.go" | grep -v "migrations.go" | grep -v "_mocks.go" | grep -v "_mocks_test.go" | grep -v "_mock_test.go" | grep -v "main.go" | grep -v "db.go" | grep -v "testingutils" | grep -v "boilerplate" > /root/coverage.txt || true | |
| - name: Upload coverage report | |
| uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: /root/coverage.txt | |
| flags: unittests | |
| - run: cat /root/test.json | |
| if: always() | |
| - run: wget https://github.com/mfridman/tparse/releases/latest/download/tparse_linux_x86_64 -O tparse && chmod 777 tparse && ./tparse -all -file=/root/test.json | |
| if: always() | |
| - uses: guyarb/golang-test-annotations@96fc379b171c49932041d6c789e73331a7bdeec1 # v0.9.0 | |
| if: always() | |
| with: | |
| test-results: /root/test.json | |
| frontend: | |
| runs-on: ubuntu-latest | |
| container: node:24-alpine | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install and build frontend | |
| working-directory: frontend | |
| run: npm install && npm run build | |
| helm-test: | |
| runs-on: ubuntu-latest | |
| container: alpine/helm | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - run: helm lint helm | |
| trivy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0 | |
| with: | |
| scan-type: fs | |
| scan-ref: . | |
| format: table | |
| exit-code: '1' | |
| ignore-unfixed: true | |
| severity: HIGH,CRITICAL | |
| skip-dirs: frontend | |
| govulncheck: | |
| runs-on: ubuntu-latest | |
| container: golang:alpine | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - run: apk update && apk add git | |
| - run: go install golang.org/x/vuln/cmd/govulncheck@latest | |
| - run: govulncheck ./... |