From 19ee4852bbfb46b85973baf455bd226e8966e270 Mon Sep 17 00:00:00 2001 From: LegrandNico Date: Tue, 29 Oct 2024 12:35:50 +0100 Subject: [PATCH] github action --- .github/workflows/test.yml | 17 ++++++++++++++--- pyproject.toml | 1 + 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2d7df66cb..8fefe136d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,18 +37,29 @@ jobs: # Step 4: Install System Dependencies - name: Install Graphviz run: sudo apt-get install -y graphviz + + # Step 5: Install Rust + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal - # Step 5: Install Python Dependencies using Poetry + # Step 6: Install Python Dependencies using Poetry - name: Install dependencies run: | poetry install --with dev + + # Step 7: Install the Rust package + - name: Build and Install the Package + run: maturin develop - # Step 6: Run Tests and Generate Coverage Report + # Step 8: Run Tests and Generate Coverage Report - name: Run tests and coverage run: | poetry run pytest ./tests/ --cov=./src/pyhgf/ --cov-report=xml - # Step 7: Upload Coverage Report to Codecov + # Step 9: Upload Coverage Report to Codecov - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: diff --git a/pyproject.toml b/pyproject.toml index eae00e95f..678d407fd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,6 +54,7 @@ ipykernel = "^6.29.5 " coverage = "^7.6.3" pytest = "^8.3.3" pytest-cov = "^5.0.0" +maturin = "^1.7.4" [build-system] requires = ["poetry-core", "poetry-dynamic-versioning>=1.0.0,<2.0.0", "maturin>=1.4,<2.0"]