Skip to content

Commit

Permalink
only run output-tests if running integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomocavalieri committed Mar 2, 2025
1 parent f93ad3a commit 55c8464
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion test-output/src/tests/echo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 55c8464

Please sign in to comment.