diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 569b15d..4cc2819 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -62,7 +62,6 @@ jobs: pack config default-builder paketobuildpacks/builder-jammy-tiny:latest - name: Prepare build environment - working-directory: backend run: | # Create .env.production for build (no secrets, just structure) cat > .env.production << EOF @@ -77,15 +76,15 @@ jobs: run: | PACK_ARGS=( "${IMAGE_NAME}:${IMAGE_TAG}" - --path backend + --path . ) if [ -n "$PACK_DOCKER_HOST" ]; then PACK_ARGS+=(--docker-host "$PACK_DOCKER_HOST") fi - if [ -f "backend/.env.production" ]; then - PACK_ARGS+=(--env-file backend/.env.production) + if [ -f ".env.production" ]; then + PACK_ARGS+=(--env-file .env.production) fi pack build "${PACK_ARGS[@]}" diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 4da36b6..daaec97 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -7,14 +7,20 @@ on: - production - develop paths: - - 'backend/**' + - '**/*.go' + - 'go.mod' + - 'go.sum' + - '.gitea/workflows/test.yml' pull_request: branches: - main - production - develop paths: - - 'backend/**' + - '**/*.go' + - 'go.mod' + - 'go.sum' + - '.gitea/workflows/test.yml' jobs: test: @@ -34,23 +40,21 @@ jobs: uses: actions/cache@v4 with: path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('backend/go.sum') }} + key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }} restore-keys: | ${{ runner.os }}-go- - name: Install dependencies - working-directory: backend run: go mod download - name: Run tests - working-directory: backend run: go test -v -race -coverprofile=coverage.out ./... - name: Upload coverage uses: codecov/codecov-action@v4 if: always() with: - file: ./backend/coverage.out + file: ./coverage.out flags: backend name: backend-coverage @@ -71,4 +75,3 @@ jobs: uses: golangci/golangci-lint-action@v4 with: version: latest - working-directory: backend