diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 27de7d2c..b93d80c7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -537,7 +537,7 @@ jobs: - name: Test CLI if: matrix.run_tests == true - run: ./test_ci.sh "${{ matrix.target }}/release" + run: npx -y toolproof@latest -s -c 1 --timeout 45 --placeholders pagefind_mode="${{ matrix.target }}/release" - name: Move extended binary aside run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 15f54e70..635e6bbf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -117,7 +117,7 @@ jobs: run: cargo test --release --lib --features extended - name: Test CLI - run: ./test_ci.sh "release" + run: npx -y toolproof@latest -s -c 1 --timeout 45 - name: Set up poetry run: ./wrappers/python/scripts/ci/github/setup_poetry.sh diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d8ca0628..2859d2f7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -68,7 +68,7 @@ After building, you'll have a final Pagefind binary at `target/release/pagefind` ## Test suite -To run the integration test suite, from the root folder run `./test_interactive.sh`. +To run the integration test suite, from the root folder run `npx toolproof@latest`. This will give you a terminal interface to run tests and accept snapshot changes. From the `pagefind` directory you can run `cargo test` for unit tests. diff --git a/pagefind/integration_tests/_macros/node.toolproof.macro.yml b/pagefind/integration_tests/_macros/node.toolproof.macro.yml new file mode 100644 index 00000000..12da3d06 --- /dev/null +++ b/pagefind/integration_tests/_macros/node.toolproof.macro.yml @@ -0,0 +1,3 @@ +macro: I run Pagefind Node as {file} in {dir} +steps: + - I run "cd %dir% && npm i && PAGEFIND_BINARY_PATH=%toolproof_process_directory%/target/%pagefind_mode%/pagefind node %file%" diff --git a/pagefind/integration_tests/_macros/python.toolproof.macro.yml b/pagefind/integration_tests/_macros/python.toolproof.macro.yml new file mode 100644 index 00000000..09a8e237 --- /dev/null +++ b/pagefind/integration_tests/_macros/python.toolproof.macro.yml @@ -0,0 +1,3 @@ +macro: I run Pagefind Python as {file} in {dir} +steps: + - I run "cd %dir% && PAGEFIND_BINARY_PATH=%toolproof_process_directory%/target/%pagefind_mode%/pagefind python3 %file%" diff --git a/pagefind/integration_tests/_macros/run.toolproof.macro.yml b/pagefind/integration_tests/_macros/run.toolproof.macro.yml new file mode 100644 index 00000000..70b6b562 --- /dev/null +++ b/pagefind/integration_tests/_macros/run.toolproof.macro.yml @@ -0,0 +1,3 @@ +macro: I run Pagefind +steps: + - I run "%toolproof_process_directory%/target/%pagefind_mode%/pagefind" diff --git a/pagefind/integration_tests/_macros/run_with_flags.toolproof.macro.yml b/pagefind/integration_tests/_macros/run_with_flags.toolproof.macro.yml new file mode 100644 index 00000000..271d4536 --- /dev/null +++ b/pagefind/integration_tests/_macros/run_with_flags.toolproof.macro.yml @@ -0,0 +1,3 @@ +macro: I run Pagefind with {flags} +steps: + - I run "%toolproof_process_directory%/target/%pagefind_mode%/pagefind %flags%" diff --git a/pagefind/integration_tests/anchors/background.toolproof.yml b/pagefind/integration_tests/anchors/background.toolproof.yml index cda81841..3fd7b6b4 100644 --- a/pagefind/integration_tests/anchors/background.toolproof.yml +++ b/pagefind/integration_tests/anchors/background.toolproof.yml @@ -51,7 +51,7 @@ steps:
You can run cargo install pagefind
to build from source.