diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml new file mode 100644 index 0000000..db52a6e --- /dev/null +++ b/.github/workflows/ci-test.yml @@ -0,0 +1,50 @@ +name: CI - test + +on: + push: + branches: [ "main", "develop" ] + pull_request: + branches: [ "main", "develop" ] + +permissions: + contents: read + checks: write + pull-requests: write + +jobs: + build: + name: Build and test project + runs-on: ubuntu-latest + + steps: + - name: Checkout the code + uses: actions/checkout@v3 + with: + token: ${{ secrets.ACTION_TOKEN }} + submodules: true + + - name: Set up JDK 21 + uses: actions/setup-java@v3 + with: + java-version: '21' + distribution: 'corretto' + + - name: Grant execute permission for gradlew + run: | + chmod +x ./gradlew + + - name: Test with Gradle + run: | + ./gradlew test + + - name: Publish result of unit test + uses: EnricoMi/publish-unit-test-result-action@v2 + if: always() + with: + files: "**/build/test-results/test/TEST-*.xml" + + - name: Publish failure of unit test + uses: mikepenz/action-junit-report@v3 + if: always() + with: + report_paths: '**/build/test-results/test/TEST-*.xml' \ No newline at end of file diff --git a/.github/workflows/code_quality.yml b/.github/workflows/code_quality.yml deleted file mode 100644 index c634b0c..0000000 --- a/.github/workflows/code_quality.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: Qodana -on: - workflow_dispatch: - pull_request: - push: - branches: - - main, develop - -jobs: - test-and-report: - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - checks: write - steps: - - name: Checkout the code - uses: actions/checkout@v3 - with: - token: ${{ secrets.ACTION_TOKEN }} - submodules: true - fetch-depth: 0 - - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'corretto' - cache: 'gradle' - - - name: Validate Gradle Wrapper - run: chmod +x ./gradlew --version - working-directory: ./ - - - name: Create code coverage folder if not exists - run: | - mkdir -p .qodana/code-coverage - working-directory: ./ - - - name: permission - run: chmod +x gradlew - working-directory: ./ - - - name: Run Tests - run: ./gradlew test - working-directory: ./ - - - name: Archive coverage data - uses: actions/upload-artifact@v2 - with: - name: gradle-coverage-data-jacoco - path: .qodana/code-coverage/test - - - name: 'Qodana Scan' - uses: JetBrains/qodana-action@main - env: - QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Publish result of unit test - uses: EnricoMi/publish-unit-test-result-action@v2 - if: always() - with: - files: "**/build/test-results/test/TEST-*.xml" - - - name: Publish failure of unit test - uses: mikepenz/action-junit-report@v3 - if: always() - with: - report_paths: '**/build/test-results/test/TEST-*.xml' \ No newline at end of file diff --git a/infrastructure/internal/src/main/java/blisgo/infrastructure/internal/security/SecurityConfig.java b/infrastructure/internal/src/main/java/blisgo/infrastructure/internal/security/SecurityConfig.java index cdeae3a..ed00604 100644 --- a/infrastructure/internal/src/main/java/blisgo/infrastructure/internal/security/SecurityConfig.java +++ b/infrastructure/internal/src/main/java/blisgo/infrastructure/internal/security/SecurityConfig.java @@ -76,11 +76,8 @@ private LogoutHandler logoutHandler() { @Bean CorsConfigurationSource corsConfigurationSource() { CorsConfiguration configuration = new CorsConfiguration(); - configuration.setAllowedOrigins(List.of( - "http://localhost:8080", - "https://blisgo.up.railway.app", - "https://blisgo.org", - "https://www.blisgo.org")); + configuration.setAllowedOrigins( + List.of("http://localhost:8080", "https://blisgo.org", "https://www.blisgo.org")); configuration.setAllowedMethods(List.of( HttpMethod.GET.name(), HttpMethod.POST.name(),