name: "Setup project" description: "Setup Python and Poetry" inputs: full: description: > If true, do a full setup, else install only python, uv and non-xapian python deps required: false default: "false" runs: using: composite steps: - name: Install apt packages if: ${{ inputs.full == 'true' }} uses: awalsh128/cache-apt-pkgs-action@v1.6.0 with: packages: gettext version: 1.0 # increment to reset cache - name: Install Redis if: ${{ inputs.full == 'true' }} uses: shogo82148/actions-setup-redis@v1 with: redis-version: "7.x" - name: "Set up Python" uses: actions/setup-python@v6 with: python-version-file: ".python-version" - name: Install uv uses: astral-sh/setup-uv@v8.1.0 with: version: "0.11.8" enable-cache: false cache-dependency-glob: "uv.lock" - name: Restore cached virtualenv uses: actions/cache@v5 with: path: .venv key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} restore-keys: | uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} uv-${{ runner.os }} - name: Install dependencies run: uv sync --locked shell: bash - name: Install Xapian if: ${{ inputs.full == 'true' }} run: uv run ./manage.py install_xapian shell: bash - name: Compile gettext messages if: ${{ inputs.full == 'true' }} run: uv run ./manage.py compilemessages shell: bash