This repository was archived by the owner on Feb 23, 2026. It is now read-only.
Merge pull request #223 from Dobefu/dependabot/npm_and_yarn/tanstack/… #954
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 | |
| on: | |
| push: | |
| branches: ["*"] | |
| tags: ["v*"] | |
| pull_request: | |
| branches: ["*"] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-nextjs: | |
| name: "Build NextJS" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: "./.nvmrc" | |
| cache: 'pnpm' | |
| cache-dependency-path: './pnpm-lock.yaml' | |
| - name: Create a .env file | |
| run: | | |
| touch .env | |
| echo "APP_NAME=\"${{ vars.APP_NAME }}\"" >> .env | |
| - name: Restore cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.npm | |
| ${{ github.workspace }}/.next/cache | |
| key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} | |
| restore-keys: | | |
| ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}- | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build | |
| run: pnpm build | |
| env: | |
| GIT_HASH: ${{ github.sha }} | |
| build-golang: | |
| name: "Build Golang" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: "./api/go.mod" | |
| cache-dependency-path: ./api/go.sum | |
| - name: Install dependencies | |
| working-directory: ./api | |
| run: go get . | |
| - name: Build | |
| working-directory: ./api | |
| run: go build -v ./... | |
| test-nextjs: | |
| name: "Test NextJS" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/download-artifact@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: "./.nvmrc" | |
| cache: 'pnpm' | |
| cache-dependency-path: './pnpm-lock.yaml' | |
| - name: Create a .env file | |
| run: | | |
| touch .env | |
| echo "APP_NAME=\"${{ vars.APP_NAME }}\"" >> .env | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Run tests | |
| run: pnpm coverage | |
| - name: Delete the .env file after tests are completed | |
| run: rm .env | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage | |
| path: coverage/ | |
| test-golang: | |
| name: "Test Golang" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: "./api/go.mod" | |
| cache-dependency-path: ./api/go.sum | |
| - name: Create a test results directory | |
| working-directory: ./api | |
| run: mkdir test-results | |
| - name: Run tests | |
| working-directory: ./api | |
| run: | | |
| go test "./..." -coverprofile="test-results/coverage.out" -covermode=count | |
| go test "./..." -coverprofile="coverage.out" -covermode=count -json > test-report.out | |
| grep -v "test_utils.go" coverage.out > coverage.tmp | |
| grep -v "test_utils.go" test-report.out > test-report.tmp | |
| mv coverage.tmp test-results/coverage.out | |
| mv test-report.tmp test-results/test-report.out | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results | |
| path: api/test-results/ | |
| sonar-scan: | |
| name: "SonarQube Scan" | |
| needs: [test-nextjs, test-golang] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/download-artifact@v4 | |
| - name: SonarQube Scan | |
| uses: SonarSource/sonarqube-scan-action@v6.0.0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |