Skip to content

Commit

Permalink
Fix failing copier test
Browse files Browse the repository at this point in the history
  • Loading branch information
object-Object committed Nov 22, 2023
1 parent ca4471c commit 92f86a8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
26 changes: 20 additions & 6 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,29 @@ def test(session: nox.Session):
def test_submodules(session: nox.Session):
session.install("-e", ".[test]", "-e", "./submodules/HexMod")

export_cmd = ["hexdoc", "export", "--branch", "main"]
session.run(*export_cmd)
session.run(*export_cmd, "--props", "submodules/HexMod/doc/hexdoc.toml")
# Hex Casting

for props_file in [
"hexdoc.toml",
"submodules/HexMod/doc/hexdoc.toml",
]:
env = {
"GITHUB_REPOSITORY": "GITHUB_REPOSITORY",
"GITHUB_SHA": "GITHUB_SHA",
"GITHUB_PAGES_URL": "GITHUB_PAGES_URL",
"DEBUG_GITHUBUSERCONTENT": "DEBUG_GITHUBUSERCONTENT",
}
session.run(
"hexdoc", "export", "--branch", "main", "--props", props_file, env=env
)

session.run("pytest", "-m", "hexcasting", *session.posargs)

# copier-template-tester
shutil.rmtree("submodules/hexdoc-hexcasting-template/.ctt", ignore_errors=True)
session.run("ctt", "--base-dir", "submodules/hexdoc-hexcasting-template")
# hexdoc-hexcasting-template

ctt_root = "submodules/hexdoc-hexcasting-template"
shutil.rmtree(f"{ctt_root}/.ctt", ignore_errors=True)
session.run("ctt", "--base-dir", ctt_root) # run copier-template-tester

session.run("pytest", "-m", "copier", *session.posargs)

Expand Down
2 changes: 1 addition & 1 deletion submodules/hexdoc-hexcasting-template
Submodule hexdoc-hexcasting-template updated from 9ca6ac to 9d01d5

0 comments on commit 92f86a8

Please sign in to comment.