Temporarily deactivate windows e2e tests #494
Workflow file for this run
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
| # Builds JPlag and then runs Datasets and Report Viewer tests on multiple OS | |
| name: End-to-End Tests | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| paths: | |
| - ".github/workflows/test-e2e.yml" | |
| - "report-viewer/**" | |
| - "**/pom.xml" | |
| - "**.java" | |
| - "**.g4" | |
| jobs: | |
| pre_job: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| should_skip: ${{ steps.skip_check.outputs.should_skip }} | |
| steps: | |
| - id: skip_check | |
| uses: fkirc/skip-duplicate-actions@v5 | |
| with: | |
| concurrent_skipping: 'same_content_newer' | |
| skip_after_successful_duplicate: 'true' | |
| build_jar: | |
| needs: pre_job | |
| if: ${{ needs.pre_job.outputs.should_skip != 'true' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 25 | |
| distribution: 'temurin' | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: "lts/*" | |
| - name: Build Assembly | |
| run: mvn -DskipTests clean package assembly:single | |
| - name: Rename Jar | |
| run: mv cli/target/jplag-*-jar-with-dependencies.jar cli/target/jplag.jar | |
| - name: Upload Assembly | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: "JPlag" | |
| path: "cli/target/jplag.jar" | |
| retention-days: 30 | |
| run_jplag: | |
| needs: build_jar | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| dataset: [ | |
| {zip: "progpedia.zip", name: "progpedia", folder: "ACCEPTED", language: "java", cliArgs: "-bc base"}, | |
| {zip: "fileSingleRoot.zip", name: "fileSingleRoot", folder: "fileSingleRoot", language: "java", cliArgs: ""}, | |
| {zip: "folderSingleRoot.zip", name: "folderSingleRoot", folder: "folderSingleRoot", language: "java", cliArgs: ""}, | |
| {zip: "fileMultiRoot.zip", name: "fileMultiRoot", folder: "f0", language: "java", cliArgs: "--new f1"}, | |
| {zip: "folderMultiRoot.zip", name: "folderMultiRoot", folder: "f0", language: "java", cliArgs: "--new f1"}, | |
| {zip: "mixedMultiRoot.zip", name: "mixedBaseFile", folder: "f0", language: "java", cliArgs: "--new f1"}, | |
| {zip: "mixedMultiRoot.zip", name: "mixedBaseFolder", folder: "f1", language: "java", cliArgs: "--new f0"}, | |
| {zip: "cpp.zip", name: "cpp", folder: "./cpp", language: "cpp", cliArgs: ""}, | |
| {zip: "csharp.zip", name: "csharp", folder: "./csharp", language: "csharp", cliArgs: ""}, | |
| {zip: "python.zip", name: "python", folder: "./python", language: "python3", cliArgs: ""} | |
| ] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 25 | |
| distribution: 'temurin' | |
| - name: Get JAR | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: JPlag | |
| - name: Copy and unzip dataset windows | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| run: | | |
| Expand-Archive -LiteralPath .github/workflows/files/${{ matrix.dataset.zip }} -DestinationPath ./ | |
| - name: Copy and unzip dataset macos and ubuntu | |
| if: ${{ matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest'}} | |
| run: | | |
| unzip .github/workflows/files/${{ matrix.dataset.zip }} | |
| - name: Run JPlag | |
| run: | | |
| java -jar jplag.jar ${{ matrix.dataset.folder }} -l ${{ matrix.dataset.language }} -r ${{ matrix.dataset.name }}-report ${{ matrix.dataset.cliArgs }} | |
| - name: Upload result | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: "${{ matrix.dataset.name }}-${{ matrix.os }}" | |
| path: "${{ matrix.dataset.name }}-report.jplag" | |
| retention-days: 30 | |
| e2e_test: | |
| needs: run_jplag | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: "lts/*" | |
| - name: Install and Build | |
| working-directory: report-viewer/report-viewer | |
| run: | | |
| npm install | |
| npm run build | |
| - name: Install playwright | |
| working-directory: report-viewer | |
| run: npx playwright install --with-deps | |
| - name: Download JPlag Reports | |
| uses: actions/download-artifact@v8 | |
| with: | |
| pattern: "*-${{ matrix.os }}" | |
| path: "report-viewer/report-viewer/tests/e2e/assets" | |
| merge-multiple: true | |
| - name: Run tests | |
| working-directory: report-viewer/report-viewer | |
| run: | | |
| npm run test:e2e | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v7 | |
| if: always() | |
| with: | |
| name: "test-results-${{ matrix.os }}" | |
| path: | | |
| report-viewer/report-viewer/test-results | |
| report-viewer/report-viewer/playwright-report | |
| retention-days: 30 |