diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..e05e3f4 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,51 @@ +name: Build and test project + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +env: + RABBITMQ_HOST: 127.0.0.1 + +jobs: + test: + runs-on: ubuntu-latest + + services: + rabbitmq: + image: rabbitmq:3.13 + env: + RABBITMQ_DEFAULT_USER: guest + RABBITMQ_DEFAULT_PASS: guest + ports: + - 5672:5672 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up JDK 21 + uses: actions/setup-java@v3 + with: + java-version: '21' + distribution: 'temurin' + cache: maven + + - name: Set up Node.JS + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install assets + run: npm ci + + - name: Run checkstyle + run: mvn checkstyle:check + + - name: Run spotbugs + run: mvn spotbugs:check + + - name: Run integration tests + run: mvn test diff --git a/package-lock.json b/package-lock.json index 6ba4c5f..b5349ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "@stomp/stompjs": "^7.0.0" }, "engines": { - "node": ">=18" + "node": ">=20" } }, "node_modules/@stomp/stompjs": { diff --git a/package.json b/package.json index 2090857..d1e5c87 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "postinstall": "cp node_modules/@stomp/stompjs/bundles/stomp.umd.min.js src/main/resources/static/" }, "engines": { - "node": ">=18" + "node": ">=20" }, "dependencies": { "@stomp/stompjs": "^7.0.0"