Merge pull request #100 from aidotse/fl-initial #211
This file contains 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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Running tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
code-checks: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: Ruff Linting | |
uses: chartboost/ruff-action@v1 | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
contents: write # Ensure write permission for contents | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: provision-with-micromamba | |
uses: mamba-org/provision-with-micromamba@main | |
with: | |
environment-file: environment.yml | |
environment-name: leakpro | |
cache-downloads: false | |
- name: Clean up __pycache__ and .pyc files | |
run: | | |
find . -name "__pycache__" -exec rm -rf {} + | |
find . -name "*.pyc" -exec rm -rf {} + | |
- name: Test with pytest | |
shell: bash -l {0} | |
run: | | |
micromamba activate leakpro | |
micromamba install pytest pytest-cov | |
pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=leakpro leakpro/tests/ | tee pytest-coverage.txt | |
cat ./pytest-coverage.txt |