adjust check #24
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: check | |
on: | |
push: | |
branches: [main, master] | |
pull_request: | |
branches: [main, master] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Checkout pycoupler repository | |
- name: Checkout pycoupler repository | |
uses: actions/checkout@v3 | |
# Step 2: Set up Python | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
# Step 3: Install dependencies for pycoupler | |
- name: Install dependencies for pycoupler | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel | |
pip install -e .[dev] | |
# Step 4: Run pycoupler tests | |
- name: Run pycoupler tests | |
run: | | |
pytest --cov --cov-report=xml | |
# Step 5: Clone and test pycopanlpjml | |
- name: Clone and test pycopanlpjml | |
run: | | |
git clone https://github.com/pik-copan/pycopanlpjml.git | |
cd pycopanlpjml | |
python -m pip install -e .[dev] | |
# Ensure pycoupler is installed as a dependency for pycopanlpjml | |
pip install ../ # This installs the local version of pycoupler | |
pytest | |
# Step 6: Upload coverage reports to Codecov | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
# Step 7: Check code formatting with Black | |
- name: Check code formatting with Black | |
run: | | |
black --check . | |
# Step 8: Lint code with Flake8 | |
- name: Lint code with Flake8 | |
run: | | |
flake8 . |