Skip to content
This repository was archived by the owner on Feb 18, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ba4410b
Created e2e tests module
marcodiri Aug 2, 2021
dccbeaa
Created tests with single Client
marcodiri Aug 2, 2021
28f268f
Created tests with multiple clients
marcodiri Aug 2, 2021
8046731
Fixed tests
marcodiri Aug 2, 2021
61caeec
Modified e2e profile to start by default
marcodiri Aug 2, 2021
6590d80
Added window manager to workflow
marcodiri Aug 3, 2021
d8a5d59
Stopped Server on process end
marcodiri Aug 3, 2021
2d9d223
Fixed Server not closing AfterClass
marcodiri Aug 3, 2021
5093195
Rethrown Server thread interrupt
marcodiri Aug 3, 2021
38e8d34
Fixed code smells
marcodiri Aug 3, 2021
5dc8d55
Changed E2E workflow
marcodiri Aug 3, 2021
9a75159
Excluded Sonar naming convention rule for E2E tests
marcodiri Aug 3, 2021
d956fb6
Removed docker plugin configuration from parent
Aug 3, 2021
bef7760
Removed server start in e2e tests
Aug 3, 2021
a49eba0
Fixed communication between docker containers
Aug 3, 2021
a37f78f
Fixed code smells
Aug 3, 2021
1819b3d
Changed phase for resources maven plugin
marcodiri Aug 4, 2021
f613416
Changed name and file formatting
Aug 4, 2021
d02958a
Created Windows and macOS workflows
Aug 4, 2021
a17d42c
Implemented docker mongo random port
Aug 4, 2021
4b7683c
Revert commits that run the server into a docker image
Aug 4, 2021
5955788
Fixed code smells
Aug 4, 2021
91dd59b
Incremented await timeouts
Aug 4, 2021
35b994f
Merge branch 'e2e-tests' into windows-macos-ci
Aug 4, 2021
af51abf
Merge branch 'windows-macos-ci' into mongo-random-port
Aug 4, 2021
cdbc563
Implemented docker mongo random port on parent
Aug 4, 2021
03a75d9
Merge pull request #68 from marcodiri/mongo-random-port
Aug 4, 2021
2359894
Merge pull request #67 from marcodiri/windows-macos-ci
Aug 5, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/chatroom-coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Java CI Test Ubuntu

on:
push:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- additional-maven-args: >
-Pjacoco
-Pmutation-testing
-DskipE2E
-DrepoToken=$COVERALLS_REPO_TOKEN
-DpullRequest=${{ github.event.pull_request.number }}
org.eluder.coveralls:coveralls-maven-plugin:4.3.0:report

name: Build on ubuntu
steps:
- uses: actions/checkout@v2

- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 8

- name: Cache Maven
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml', '**/*.yml') }}
restore-keys: ${{ runner.os }}-m2-

- name: Build with Maven
run: xvfb-run mvn verify ${{ matrix.additional-maven-args }}
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
working-directory: java_socketio_chatroom_aggregator
34 changes: 34 additions & 0 deletions .github/workflows/chatroom-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Java CI Test macOS

on:
push:
branches:
- master
pull_request:

jobs:
build:
runs-on: macos-latest

name: Build in macOS
steps:
- uses: actions/checkout@v2

- name: Set up JDK 8
uses: actions/setup-java@v1
with:
java-version: 8

- name: Install Docker
uses: docker-practice/actions-setup-docker@master

- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml', '**/*.yml') }}
restore-keys: ${{ runner.os }}-m2-

- name: Build with Maven
run: mvn verify
working-directory: java_socketio_chatroom_aggregator
52 changes: 52 additions & 0 deletions .github/workflows/chatroom-sonarcloud.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Java CI Test Ubuntu Sonar

on:
push:
pull_request:

jobs:
build:
runs-on: ubuntu-latest

name: Build on ubuntu
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 11

- name: Cache SonarCloud packages
uses: actions/cache@v2
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml', '**/*.yml') }}
restore-keys: ${{ runner.os }}-m2-

- name: Install and start window manager
run: |
sudo apt-get install -y blackbox
Xvfb :99 -ac -screen 0 1280x1024x24 &
sleep 3
DISPLAY=:99 blackbox &

- name: Build with Maven and SonarCloud
run: >
DISPLAY=:99 mvn -B verify -Pjacoco sonar:sonar
-Dsonar.projectKey=marcodiri_java_socketio_chatroom
-Dsonar.organization=marcodiri
-Dsonar.host.url=https://sonarcloud.io
working-directory: java_socketio_chatroom_aggregator
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
41 changes: 41 additions & 0 deletions .github/workflows/chatroom-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Java CI Test Windows

on:
push:
branches:
- master
pull_request:

jobs:
build:
runs-on: windows-latest
env:
DOCKER_HOST: tcp://localhost:2375

name: Build in Windows
steps:
- uses: actions/checkout@v2

- name: Set up JDK 8
uses: actions/setup-java@v1
with:
java-version: 8

- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml', '**/*.yml') }}
restore-keys: ${{ runner.os }}-m2-

- name: Docker config
run: >
sc config docker
binpath="dockerd.exe --run-service -H tcp://localhost:2375"

- name: Docker restart
run: restart-service *docker*

- name: Build with Maven
run: mvn verify
working-directory: java_socketio_chatroom_aggregator
41 changes: 0 additions & 41 deletions .github/workflows/chatroom.coveralls.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/chatroom.sonarcloud.yml

This file was deleted.

22 changes: 21 additions & 1 deletion java_socketio_chatroom_aggregator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<!-- For each rule to be ignored, add another eXX and two corresponding
properties with eXX in the name as below -->
<sonar.issue.ignore.multicriteria>e11,e12,e13</sonar.issue.ignore.multicriteria>
<sonar.issue.ignore.multicriteria>e11,e12,e13,e14</sonar.issue.ignore.multicriteria>
<!-- Disable rule for "Field names should comply with a naming convention" -->
<sonar.issue.ignore.multicriteria.e11.ruleKey>
java:S116
Expand All @@ -47,6 +47,14 @@
<sonar.issue.ignore.multicriteria.e13.resourceKey>
**/ClientSwingViewTest.java
</sonar.issue.ignore.multicriteria.e13.resourceKey>
<!-- Disable rule for "Test classes should comply with a naming convention"
for E2E tests -->
<sonar.issue.ignore.multicriteria.e14.ruleKey>
java:S3577
</sonar.issue.ignore.multicriteria.e14.ruleKey>
<sonar.issue.ignore.multicriteria.e14.resourceKey>
**/*E2E.java
</sonar.issue.ignore.multicriteria.e14.resourceKey>
</properties>

<profiles>
Expand All @@ -56,6 +64,18 @@
<module>../java_socketio_chatroom_report</module>
</modules>
</profile>
<profile>
<id>e2e-tests</id>
<activation>
<property>
<name>skipE2E</name>
<value>!true</value>
</property>
</activation>
<modules>
<module>../java_socketio_chatroom_e2e</module>
</modules>
</profile>
</profiles>

</project>
7 changes: 0 additions & 7 deletions java_socketio_chatroom_client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<properties>
<socketIO.version>2.0.1</socketIO.version>
<socketServerMock.version>0.0.1-SNAPSHOT</socketServerMock.version>
<assertjSwing.version>3.17.1</assertjSwing.version>

<sonar.coverage.exclusions>
**/model/*.*,
Expand Down Expand Up @@ -51,12 +50,6 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-swing-junit</artifactId>
<version>${assertjSwing.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
34 changes: 34 additions & 0 deletions java_socketio_chatroom_e2e/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/e2e/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
1 change: 1 addition & 0 deletions java_socketio_chatroom_e2e/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target/
23 changes: 23 additions & 0 deletions java_socketio_chatroom_e2e/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>java_socketio_chatroom_e2e</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
eclipse.preferences.version=1
encoding//src/e2e/java=UTF-8
encoding/<project>=UTF-8
Loading