-
Notifications
You must be signed in to change notification settings - Fork 0
82: Init actions CI workflow #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| name: CI | ||
| run-name: Running continuous integration on ${{ github.actor }}'s commits | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| backend-ci: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Set up Java | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: "temurin" | ||
| java-version: "25" | ||
|
|
||
| frontend-ci: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Set up node | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: "24" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| set shell := ["bash", "-uc"] | ||
|
|
||
| # Migrate to local DB | ||
| migrate *args: | ||
| dotenvx run -- ./mvnw flyway:migrate -Dflyway.locations=filesystem:./db {{args}} | ||
|
|
||
| # Drop local DB | ||
| drop *args: | ||
| dotenvx run -- ./mvnw flyway:clean -Dflyway.locations=filesystem:./db -Dflyway.cleanDisabled=false {{args}} | ||
|
|
||
| # Run the backend Spring server | ||
| backend-dev *args: | ||
| dotenvx run -f .env -- ./mvnw -Dspring-boot.run.profiles=dev spring-boot:run {{args}} | ||
|
|
||
| # Run the backend Spring server with an exposed debugger at :5005 | ||
| backend-dev-debug *args: | ||
|
rootandroo marked this conversation as resolved.
|
||
| dotenvx run -- ./mvnw \ | ||
| -Dspring-boot.run.profiles=dev \ | ||
| -Dspring-boot.run.jvmArguments="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005" \ | ||
| spring-boot:run {{args}} | ||
|
|
||
| # Builds and installs Spring backend | ||
| backend-install *args: | ||
| ./mvnw install -DskipTests=true {{args}} | ||
|
|
||
| # Run backend formatter (check only) | ||
| backend-spotless *args: | ||
| ./mvnw spotless:check | ||
|
|
||
| # Run backend formatter (check & write) | ||
| backend-spotless-fix *args: | ||
| ./mvnw spotless:apply | ||
|
|
||
| # Run backend linter, formatter, & tests | ||
| backend-test *args: | ||
| just backend-spotless && dotenvx run -f .env -- ./mvnw checkstyle:check verify -Dspring.profiles.active=ci {{args}} | ||
|
|
||
| # Run backend tests with a debugger | ||
| backend-testd *args: | ||
| just backend-spotless && dotenvx run -f .env -- ./mvnw checkstyle:check verify -Dspring.profiles.active=ci -Dmaven.surefire.debug {{args}} | ||
|
|
||
| # Run the frontend | ||
| frontend-dev *args: | ||
| cd js && pnpm i && pnpm run dev {{args}} | ||
|
|
||
| # Builds and installs frontend packages | ||
| frontend-install *args: | ||
| cd js && pnpm i | ||
|
|
||
| # Frontend tests | ||
| frontend-test *args: | ||
| cd js && pnpm run test | ||
|
|
||
| ## Generate types through OpenAPI | ||
| #type-gen *args: | ||
| # cd js && pnpm run generate {{args}} | ||
| # | ||
| ## Run the react-email development server | ||
| #email-dev *args: | ||
| # cd email && pnpm i && pnpm email dev --dir emails {{args}} | ||
| # | ||
| ## Generate HTML output of react-email and copy to backend static folder | ||
| #email-gen *args: | ||
| # cd email && bash email.sh {{args}} | ||
|
|
||
| # Run the dev servers (backend & frontend) | ||
| dev *args: | ||
| #cp internal/pre-commit .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit && | ||
| npx concurrently "just backend-dev" "just frontend-dev" {{args}} | ||
|
|
||
| # Run the dev servers (backend & frontend) but the backend will launch a debugger server. | ||
| devd *args: | ||
| npx concurrently "just backend-dev-debug" "just frontend-dev" {{args}} | ||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.