Update dependencies, remove support for Python 3.9 (#159) #425
This file contains hidden or 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 | |
| on: | |
| push: | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| python-version: ["3.10", "3.13"] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Poetry | |
| uses: Gr1N/setup-poetry@v9 | |
| - name: Install dependencies with Poetry | |
| # poetry setuptools workaround sourced from: | |
| # https://github.com/python-poetry/poetry/issues/7611#issuecomment-1711443539 | |
| run: | | |
| poetry --version | |
| poetry self add setuptools | |
| poetry install | |
| # Install twine to test build | |
| python -m pip install build twine | |
| - name: Install modelicafmt | |
| env: | |
| MODELICA_FMT_VERSION: v0.3.1 | |
| run: | | |
| curl -SLO "https://github.com/urbanopt/modelica-fmt/releases/download/${MODELICA_FMT_VERSION}/modelica-fmt_Linux_x86_64.tar.gz" | |
| tar --exclude='README.md' --exclude='CHANGELOG.md' -xzf modelica-fmt_Linux_x86_64.tar.gz | |
| chmod +x modelicafmt | |
| sudo mv modelicafmt /usr/local/bin/ | |
| - name: Run pre-commit | |
| run: poetry run pre-commit run --all-files | |
| - name: Build docs | |
| run: | | |
| cd docs && poetry run make html && cd .. | |
| - name: Test syntax of build package | |
| run: | | |
| python -m build | |
| python -m twine check dist/* | |
| - name: Run pytest | |
| run: poetry run pytest -v --cov-report term-missing --cov | |
| - name: Coveralls | |
| if: ${{ success() }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: poetry run coveralls --service=github |