chore(deps): update actions/cache action to v5 (#1231) #4438
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: Test | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| python-version: | |
| - '3.12' | |
| - '3.13' | |
| - '3.14' | |
| name: Python ${{ matrix.python-version }} | |
| services: | |
| redis: | |
| image: redis:8.4.0-alpine@sha256:6cbef353e480a8a6e7f10ec545f13d7d3fa85a212cdcc5ffaf5a1c818b9d3798 | |
| ports: | |
| - 6379:6379 | |
| postgres: | |
| image: postgres:18.1-alpine@sha256:eca6fb2d91fda290eb8cfb8ba53dd0dcbf3508a08011e30adb039ea7c8e1e9f2 | |
| ports: | |
| - 5432:5432 | |
| # needed because the postgres container does not provide a healthcheck | |
| options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Configure git | |
| run: | | |
| git config --global user.email "[email protected]" | |
| git config --global user.name "CI Job" | |
| - name: Install apt dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install libcairo-dev gir1.2-pango-1.0 libgirepository-2.0-dev libacl1-dev gettext liblz4-dev libzstd-dev libxxhash-dev gir1.2-rsvg-2.0 libleptonica-dev libtesseract-dev | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - uses: astral-sh/setup-uv@ed21f2f24f8dd64503750218de024bcf64c7250a # v7.1.5 | |
| with: | |
| cache-suffix: test-${{ matrix.python-version }} | |
| version: 0.9.17 | |
| - name: Install pip dependencies | |
| run: | | |
| uv sync --dev | |
| uv pip install https://github.com/WeblateOrg/weblate/archive/main.zip | |
| - name: Test with Django | |
| env: | |
| CI_DATABASE: postgresql | |
| CI_DB_PASSWORD: postgres | |
| CI_DB_HOST: localhost | |
| DJANGO_SETTINGS_MODULE: wlhosted.settings_test | |
| run: | | |
| uv run --no-sync weblate collectstatic --noinput | |
| uv run --no-sync pytest | |
| - uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 | |
| with: | |
| token: ${{secrets.CODECOV_TOKEN}} | |
| flags: unittests | |
| name: Python ${{ matrix.python-version }} | |
| permissions: | |
| contents: read |