release: create release-0.1.7 branch #47
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: Tests and Linters 🧪 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| linters: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: python:3.12-slim-bullseye | |
| steps: | |
| - name: setup | |
| run: | | |
| apt-get update && apt-get install -y \ | |
| coreutils \ | |
| git | |
| git config --system --add safe.directory $GITHUB_WORKSPACE | |
| - name: checkout code 📦 | |
| uses: actions/checkout@v4 | |
| - name: install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: setup env | |
| run: uv sync --only-dev | |
| - name: run linters 🖌️ | |
| run: | | |
| git init | |
| uv run --no-sync pre-commit run --all-files --verbose | |
| tests: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: python:3.12-slim-bullseye | |
| steps: | |
| - name: checkout code 📂 | |
| uses: actions/checkout@v4 | |
| - name: setup | |
| run: | | |
| apt-get update && apt-get install -y \ | |
| coreutils \ | |
| git | |
| - name: install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: setup env | |
| run: uv sync | |
| - name: run tests 🧪 | |
| run: | | |
| uv run --no-sync pytest --ignore tests/experiments --verbose \ | |
| --cov-report xml:coverage.xml \ | |
| --cov-report term-missing \ | |
| --junitxml=pytest.xml \ | |
| --cov=mlip tests/ | |
| - name: pytest coverage comment | |
| id: coverageComment | |
| uses: MishaKav/pytest-coverage-comment@main | |
| with: | |
| pytest-xml-coverage-path: ./coverage.xml | |
| junitxml-path: ./pytest.xml | |
| - name: Create the Badge | |
| uses: schneegans/dynamic-badges-action@v1.7.0 | |
| with: | |
| auth: ${{ secrets.BOT_ACCESS_TOKEN }} | |
| gistID: b6e4bf384215e60775699a83c3c00aef | |
| filename: pytest-coverage-comment.json | |
| label: Test Coverage | |
| message: ${{ steps.coverageComment.outputs.coverage }} | |
| color: ${{ steps.coverageComment.outputs.color }} | |
| namedLogo: python |