Skip to content

Commit

Permalink
Update to toolproof 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bglw committed Aug 16, 2024
1 parent 238008c commit b501f7d
Show file tree
Hide file tree
Showing 16 changed files with 60 additions and 16 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,7 @@ jobs:

- name: Test CLI
if: matrix.run_tests == true
working-directory: ./pagefind
run: TEST_BINARY=../target/${{ matrix.target }}/release/pagefind humane
run: ./test_ci.sh

- name: Move extended binary aside
run: |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#TODO: This is a broken test that needs to be fixed.

type: reference
name: Build Options > Output path can be configured with an absolute path

steps:
- ref: ./background.toolproof.yml
- step: I have a "public/index.html" file with the content {html}
Expand All @@ -14,7 +12,7 @@ steps:
lang="en"><head></head><body><h1>world</h1></body></html>
- step: >-
I run "%pagefind_exec_path% --output-subdir
%todo_toolproof_dir_abs_path%/other/_search"
%toolproof_test_directory%/other/_search"
- step: stdout should contain "Running Pagefind"
- step: The file "other/_search/pagefind.js" should not be empty
- step: I serve the directory "."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#TODO: This is a broken test that needs to be fixed.

type: reference
name: Build Options > LEGACY Output path can be configured with an absolute path

steps:
- ref: ./background.toolproof.yml
- step: I have a "public/index.html" file with the content {html}
Expand All @@ -16,7 +14,7 @@ steps:
lang="en"><head></head><body><h1>world</h1></body></html>
- step: >-
I run "%pagefind_exec_path% --bundle-dir
%todo_toolproof_dir_abs_path%/other/_search"
%toolproof_test_directory%/other/_search"
- step: stdout should contain "Running Pagefind"
- step: The file "other/_search/pagefind.js" should not be empty
- step: I serve the directory "."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
name: Node API Base Tests > An index is not consumed on write
platforms:
- linux
- mac

steps:
- ref: ./background.toolproof.yml
- step: I have a "output/index.html" file with the content {html}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
name: Node API Base Tests > Build a blended index to memory via the api
platforms:
- linux
- mac

steps:
- ref: ./background.toolproof.yml
- step: >-
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
name: Node API Base Tests > Build a synthetic index to disk via the api
platforms:
- linux
- mac

steps:
- ref: ./background.toolproof.yml
- step: I have a "public/index.js" file with the content {js}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
name: Node API Base Tests > Build a synthetic index to memory via the api
platforms:
- linux
- mac

steps:
- ref: ./background.toolproof.yml
- step: I have a "public/index.js" file with the content {js}
Expand Down Expand Up @@ -27,4 +31,4 @@ steps:
- step: stdout should contain "JS is at pagefind.js"
- step: stdout should contain "1 fragment(s)"
- step: I run "ls -lh public/pagefind/pagefind.js" and expect it to fail
notes: 'TODO: Build a file existence check into toolproof'
notes: "TODO: Build a file existence check into toolproof"
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: >-
Node API Base Tests > Build a synthetic index with overridden urls to disk via
the api
platforms:
- linux
- mac

steps:
- ref: ./background.toolproof.yml
- step: I have a "public/index.js" file with the content {js}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
name: Node API Base Tests > Build a true index to disk via the api
platforms:
- linux
- mac

steps:
- ref: ./background.toolproof.yml
- step: >-
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
name: Node API Base Tests > Build an index to a custom disk location via the api
platforms:
- linux
- mac

steps:
- ref: ./background.toolproof.yml
- step: I have a "output/index.html" file with the content {html}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
name: Node API Base Tests > Close the Pagefind backend
platforms:
- linux
- mac

steps:
- ref: ./background.toolproof.yml
- step: I have a "public/index.js" file with the content {js}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
name: Node API Base Tests > Force language takes precedence over records
platforms:
- linux
- mac

steps:
- ref: ./background.toolproof.yml
- step: I have a "public/index.js" file with the content {js}
Expand Down Expand Up @@ -29,10 +33,10 @@ steps:
- step: stdout should contain "✨!"
- step: The file "public/pagefind/pagefind.js" should not be empty
- step: I run "ls -lh public/pagefind/wasm.unknown.pagefind"
notes: 'TODO: Build a file existence check into toolproof'
notes: "TODO: Build a file existence check into toolproof"
- step: I run "ls -lh public/pagefind/wasm.fr.pagefind"
notes: 'TODO: Build a file existence check into toolproof'
notes: "TODO: Build a file existence check into toolproof"
- step: I run "ls -lh public/pagefind/wasm.pt.pagefind" and expect it to fail
notes: 'TODO: Build a file existence check into toolproof'
notes: "TODO: Build a file existence check into toolproof"
- step: I run "ls -lh public/pagefind/wasm.en.pagefind" and expect it to fail
notes: 'TODO: Build a file existence check into toolproof'
notes: "TODO: Build a file existence check into toolproof"
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
name: Node API Base Tests > Pagefind empty index returns assets
platforms:
- linux
- mac

steps:
- ref: ./background.toolproof.yml
- step: I have a "public/index.js" file with the content {js}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
name: Node API Base Tests > Pagefind error handling
platforms:
- linux
- mac

steps:
- ref: ./background.toolproof.yml
- step: I have a "public/index.js" file with the content {js}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
name: Node API Base Tests > Pagefind service config
platforms:
- linux
- mac

steps:
- ref: ./background.toolproof.yml
- step: I have a "public/index.js" file with the content {js}
Expand Down
2 changes: 1 addition & 1 deletion test_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ cd $SCRIPT_DIR
PAGEFIND=$(realpath "$SCRIPT_DIR/target/release/pagefind")
REPO_WD=$(realpath "$SCRIPT_DIR")

npx -y toolproof --placeholders pagefind_exec_path="$PAGEFIND" repo_wd="$REPO_WD"
npx -y toolproof@0.3.0 --placeholders pagefind_exec_path="$PAGEFIND" repo_wd="$REPO_WD" -c 4

0 comments on commit b501f7d

Please sign in to comment.