add pypi link to the top of readme #113
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Run SpiceCode Tests | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' # Use a Python version compatible with your project | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| # Install the project in editable mode to pick up changes | |
| pip install -e . | |
| # Install test dependencies, including pytest-cov for coverage | |
| pip install pytest typer numpy pytest-cov | |
| # Note: Ideally, dependencies should be managed via requirements-dev.txt | |
| # Consider adding pytest-cov to requirements-dev.txt later. | |
| - name: Run tests with coverage | |
| run: | | |
| python -m pytest tests/ \ | |
| --cov=spice --cov=cli --cov=utils --cov=parser --cov=lexers \ | |
| --cov-report=term-missing \ | |
| --cov-report=xml # <-- this line generates coverage.xml | |
| - name: Debug coverage file | |
| run: | | |
| ls -al | |
| cat coverage.xml || echo "coverage.xml not found" | |
| - name: SonarCloud Scan | |
| uses: SonarSource/sonarcloud-github-action@v2 | |
| with: | |
| args: > | |
| -Dsonar.python.coverage.reportPaths=coverage.xml | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |