Fixing an issue where we are incorrectly adding paths to connection types. #1938
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: Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
static-analysis: | |
name: Static analysis | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
uses: ./.github/actions/prepare-poetry | |
with: | |
python-version: "3.12" | |
# Post in-line comments for any issues found | |
# Do not run if coming from a forked repo | |
# See https://github.com/marketplace/actions/lint-action | |
- name: Run linters (with annotations) | |
if: github.event.pull_request.head.repo.full_name == github.repository | |
uses: wearerequired/lint-action@v2 | |
with: | |
flake8: true | |
flake8_command_prefix: poetry run | |
flake8_args: ResSimpy --append-config ./.config/flake8 | |
mypy: true | |
mypy_command_prefix: poetry run | |
mypy_args: ResSimpy --config-file ./.config/mypy | |
- name: Ruff checks | |
uses: jpetrucciani/ruff-check@0.6.5 | |
with: | |
path: 'ResSimpy' | |
# Alternative step that works with forked repo | |
- name: Run linters (without annotations) | |
if: github.event.pull_request.head.repo.full_name != github.repository | |
run: | | |
poetry run flake8 ResSimpy --append-config ./.config/flake8 | |
poetry run mypy ResSimpy --config-file ./.config/mypy | |
- name: Code formatting | |
run: poetry run pycodestyle ResSimpy --config=./.config/pycodestyle | |
unit-tests: | |
name: Unit tests (Python ${{ matrix.python-version }}) | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
uses: ./.github/actions/prepare-poetry | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Run pytest | |
run: poetry run pytest --cov=ResSimpy --cov-report=xml --junitxml=pytest.xml | |
- name: Upload pytest artifacts | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Unit Test Results (Python ${{ matrix.python-version }}) | |
path: pytest.xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: coverage.xml | |
fail_ci_if_error: false |