Skip to content

Commit

Permalink
ci: Run 'cargo build' before run pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
attakei committed Mar 20, 2024
1 parent 96b313a commit aacbf84
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
"""Common test contexts."""

from pathlib import Path
from subprocess import PIPE, run

import pytest

project_root = Path(__file__).parent.parent


@pytest.fixture(scope="session", autouse=True)
def build_test_target():
"""Generate age binary for testing."""
run(["cargo", "build"], stdout=PIPE, stderr=PIPE, cwd=project_root)


@pytest.fixture
def root() -> Path:
"""Path-object of project root."""
return Path(__file__).parent.parent
return project_root


@pytest.fixture
Expand Down

0 comments on commit aacbf84

Please sign in to comment.