Skip to content

Commit fe9ab15

Browse files
Add e2e test for template repo and github workflow (#3)
Co-authored-by: Sergi Philipsen <philipsen.sergi@gmail.com>
1 parent 50b0ed9 commit fe9ab15

68 files changed

Lines changed: 2632 additions & 747 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
File renamed without changes.

.github/workflows/testing.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
testing:
10+
name: Run tests
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v2
16+
17+
- name: Setup JDK 21
18+
uses: actions/setup-java@v4
19+
with:
20+
distribution: 'temurin'
21+
java-version: '21'
22+
23+
- name: Install pnpm
24+
uses: pnpm/action-setup@v4
25+
with:
26+
version: 10
27+
28+
- name: Set up Node.js 22.x
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: 22.x
32+
cache: 'pnpm'
33+
cache-dependency-path: '**/pnpm-lock.yaml'
34+
35+
- name: Install dependencies
36+
run: pnpm install --frozen-lockfile
37+
working-directory: src/main/frontend
38+
39+
- name: Build Application
40+
run: ./mvnw clean test -B
41+
42+
- name: Store Cypress Results
43+
if: failure()
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: cypress-test-results
47+
path: ${{ github.workspace }}/*/target/test-classes/e2e/cypress/test-results

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
HELP.md
22
target/
3-
.mvn/wrapper/maven-wrapper.jar
43
!**/src/main/**/target/
54
!**/src/test/**/target/
65

6+
**/node_modules/
7+
78
### STS ###
89
.apt_generated
910
.classpath
File renamed without changes.

README.md

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,41 @@
1-
# Multi Module Template
1+
# WebApp Template
22

3-
This project is a setup for multimodule repositories, specifically for at least a SpringBoot Backend and an Angular Frontend.
3+
This project is a setup for a web application, specifically for a SpringBoot application with an Angular frontend.
44

5-
# How to build
6-
By running maven build from the builder module, it builds the frontend and backend and then adds the frontend files to the backend where it serves them on the root /.
7-
It also has a builtin retry for index.html, so a custom nginx config to retry index.html if it does not find the html file is not needed.
5+
## Build from source
6+
7+
Building the project requires Java, Maven, NodeJS, PNPM and Docker installed on your system.
8+
9+
To build the project from source, run this command:
10+
11+
```bash
12+
mvn clean install
13+
```
14+
15+
## Development
16+
17+
To run the application in development mode, you can use the following commands:
18+
19+
1. Start the backend server:
20+
```bash
21+
mvn spring-boot:run
22+
```
23+
2. Start the frontend server:
24+
```bash
25+
cd src/main/frontend
26+
pnpm install
27+
pnpm start
28+
```
29+
30+
### E2e Testing
31+
32+
For e2e testing, you can use Cypress. To run the e2e tests, follow these steps:
33+
34+
1. Navigate to the frontend directory:
35+
```bash
36+
cd src/main/frontend
37+
```
38+
2. Run the e2e tests:
39+
```bash
40+
pnpm e2e
41+
```

backend/.gitignore

Lines changed: 0 additions & 35 deletions
This file was deleted.

backend/pom.xml

Lines changed: 0 additions & 54 deletions
This file was deleted.

backend/src/main/java/org/frankframework/backend/BackendApplication.java

Lines changed: 0 additions & 13 deletions
This file was deleted.

backend/src/main/resources/application.properties

Lines changed: 0 additions & 2 deletions
This file was deleted.

builder/pom.xml

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)