MEG Pipeline #233
Workflow file for this run
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
name: Automated Testing Action | |
# Run the workflow on pull requests and pushes to the main branch | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
# Set up Python and dependencies | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r docs/requirements.txt # Make sure you have a requirements.txt | |
- name: Run tests | |
run: | | |
pytest tests/ # Change 'tests/' to your test directory | |
# Optional: If you want to display coverage, you can add a step like this | |
- name: Report coverage | |
run: | | |
pip install pytest-cov | |
pytest --cov=your_module tests/ |