chore(deps): update dependencies (#686) #1443
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: Build | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ['v*'] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| env: | |
| LATEST_PY_VERSION: '3.12' | |
| POETRY_VERSION: '2.0.1' | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: | |
| - '3.13' | |
| - '3.12' | |
| - '3.11' | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - uses: snok/install-poetry@a783c322200f0519c7926aa6faa857c4e23e9263 # v1.4.2 | |
| with: | |
| virtualenvs-in-project: true | |
| version: ${{ env.POETRY_VERSION }} | |
| # Cache packages per python version, and reuse until lockfile changes | |
| - name: Cache python packages | |
| id: cache | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: .venv | |
| key: venv-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} | |
| - name: Install dependencies | |
| #if: steps.cache.outputs.cache-hit != 'true' | |
| run: poetry install -v --without=dev,typing,docs | |
| # Run tests | |
| - name: Run tests | |
| run: | | |
| source $VENV | |
| pytest -ra tests --cov=otterdog --cov-report=term --cov-report=html | |
| # Run code analysis checks | |
| analyze: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 | |
| with: | |
| python-version: ${{ env.LATEST_PY_VERSION }} | |
| - uses: snok/install-poetry@a783c322200f0519c7926aa6faa857c4e23e9263 # v1.4.2 | |
| with: | |
| virtualenvs-in-project: true | |
| version: ${{ env.POETRY_VERSION }} | |
| # Cache packages per python version, and reuse until lockfile changes | |
| - name: Cache python packages | |
| id: cache | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: .venv | |
| key: venv-${{ env.pythonLocation }}-${{ hashFiles('poetry.lock') }} | |
| - name: Install dependencies | |
| run: poetry install -v --without=docs | |
| - name: Cache prek data | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: ~/.cache/prek | |
| key: prek-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} | |
| - name: Run prek | |
| run: | | |
| source $VENV | |
| prek run --show-diff-on-failure --color=always --all-files |