CI #30
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: CI | |
# This section controls when the workflow will run | |
on: | |
# Run the workflow on push to "main" branch | |
push: | |
branches: [ "main" ] | |
# Run the workflow on pull request to "main" branch and ready for review | |
pull_request: | |
branches: [ "main"] | |
types: [ready_for_review] | |
# Run the workflow manually | |
workflow_dispatch: | |
# This section controls which jobs the workflow will run | |
jobs: | |
lint-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Create venv and install sledo | |
run: | | |
python -m venv venv | |
. venv/bin/activate | |
pip install .[test] | |
- name: Clone and install mooseherder | |
run: | | |
cd .. | |
git clone https://github.com/ScepticalRabbit/mooseherder | |
cd sledo | |
pip install ../mooseherder | |
- name: Clone and install catbird | |
run: | | |
cd .. | |
git clone https://github.com/helen-brooks/catbird | |
cd sledo | |
pip install ../catbird | |
- name: Run linter | |
run: | | |
. venv/bin/activate | |
pip install flake8 | |
flake8 . --exclude=venv* --count --max-complexity=10 --max-line-length=79 --statistics | |
- name: Run tests | |
run: | | |
pip install pytest | |
pytest tests |