From 55c84645181f8dde6872a908db3525e02d312255 Mon Sep 17 00:00:00 2001 From: Giacomo Cavalieri Date: Sun, 2 Mar 2025 12:07:32 +0100 Subject: [PATCH] only run output-tests if running integration tests --- .github/workflows/ci.yaml | 14 ++++---------- test-output/src/tests/echo.rs | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 831725d1ee3..a2d914e9601 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -156,7 +156,10 @@ jobs: uses: clechasseur/rs-cargo@v3 with: command: test - args: "--workspace --target ${{ matrix.target }}" + args: >- + --workspace + --target ${{ matrix.target }} + ${{ (matrix.run-integration-tests && ' ') || '--exclude test-output' }} tool: ${{ matrix.cargo-tool }} - name: test/project_erlang (non-windows) @@ -191,15 +194,6 @@ jobs: working-directory: ./test/project_erlang_windows if: ${{ runner.os == 'Windows' && matrix.run-integration-tests }} - - name: test-output - uses: clechasseur/rs-cargo@v3 - with: - command: test - args: "--target ${{ matrix.target }}" - tool: ${{ matrix.cargo-tool }} - working-directory: "./test-output" - if: ${{ matrix.run-integration-tests }} - - name: test/project_erlang export package-interface (non-windows) run: | gleam export package-interface --out="interface.json" diff --git a/test-output/src/tests/echo.rs b/test-output/src/tests/echo.rs index ae9aa6f92e1..3d9a2b0bc3a 100644 --- a/test-output/src/tests/echo.rs +++ b/test-output/src/tests/echo.rs @@ -23,7 +23,7 @@ fn run_and_produce_pretty_snapshot( let output = run_and_capture_output(&paths, "main", target, runtime) // Echo's output includes paths, so we need this to make sure tests do // not fail when running on Windows. - .replace("src\\", "src/"); + .replace("src/", "src\\"); let main_module_content = fs::read(paths.src_directory().join("main.gleam")).expect("read main module");