Skip to content

Feature/27 implement cicd#42

Merged
eevatsen merged 21 commits into
developfrom
feature/27-implement-cicd
Apr 30, 2026
Merged

Feature/27 implement cicd#42
eevatsen merged 21 commits into
developfrom
feature/27-implement-cicd

Conversation

@viktorpekhun

@viktorpekhun viktorpekhun commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add GitHub Actions workflows: PR validation (API + client) and release to production (build, push to Docker Hub, deploy to Azure)
  • Add Dockerfiles for API and Angular client with multi-stage builds
  • Add Docker Compose for running the full stack locally (API, client, SQL Server)
  • Add runtime configuration for Angular — ConfigService loads config.json at startup, injected via envsubst in Docker so API URL is environment-driven without rebuilding
  • Add .nvmrc pinning Node 24 LTS; document setup with fnm or direct install in README
  • Add Swagger UI for API (Development only)
  • Update README with Docker Compose quickstart and local dev instructions for both API and client

WARNING

Now we use Node 24 LTS, so make sure it is installed on your system before runing locally. You can either set it default for this project, or follow steps in README

@viktorpekhun viktorpekhun linked an issue Apr 28, 2026 that may be closed by this pull request

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing Client-Side Tests: In pr-validation.yml, the build-and-test-client job installs dependencies and builds the project, but it never runs npm test. Regressions in UI logic will not be caught during PR reviews.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The release-to-prod.yml workflow builds and deploys immediately upon a push to main. It does not run any unit or integration tests. If a merge to main introduces an integration issue not caught in the PR, it will be deployed directly to production.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@eevatsen

Copy link
Copy Markdown
Contributor

There are no steps for linting or formatting validation (e.g., dotnet format --verify-no-changes or npm run lint). This allows inconsistent code styles to enter the codebase.

@eevatsen

Copy link
Copy Markdown
Contributor

The release workflow considers a deployment successful as soon as Azure accepts the image. It doesn't verify if the app is actually "Alive" (e.g., by hitting a /health or /api/status endpoint).

Comment thread .github/workflows/pr-validation.yml Outdated
Comment on lines +59 to +63
run: npm run build -- --configuration production

- name: Verify Client Dockerfile builds
working-directory: .
run: docker build -t smarteventbooking-client:test src/client/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In pr-validation.yml, the job runs npm run build and then immediately runs docker build. Since the Dockerfile also performs a build, you are effectively building the Angular app twice, which significantly increases CI time.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@viktorpekhun

Copy link
Copy Markdown
Contributor Author

There are no steps for linting or formatting validation (e.g., dotnet format --verify-no-changes or npm run lint). This allows inconsistent code styles to enter the codebase.

Didn't add this on purpose. I'm not sure whether code is consistent now, so to avoid delays before demo I decided not to add it

@eevatsen

eevatsen commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Unlike the release workflow, the PR validation workflow does not use cache-from: type=gha. This means every PR build starts from scratch, wasting time on downloading base layers and re-installing packages.

@viktorpekhun viktorpekhun requested a review from eevatsen April 28, 2026 23:12

@eevatsen eevatsen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@viktorpekhun viktorpekhun removed the request for review from zEML9K April 30, 2026 10:42
@eevatsen eevatsen merged commit 7ad909f into develop Apr 30, 2026
2 checks passed
@eevatsen eevatsen deleted the feature/27-implement-cicd branch April 30, 2026 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement CI/CD

4 participants