Sith/.github/actions/setup_project/action.yml

43 lines
1.2 KiB
YAML
Raw Normal View History

2023-05-02 09:00:23 +00:00
name: "Setup project"
description: "Setup Python and Poetry"
runs:
using: composite
steps:
- name: Install apt packages
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: gettext
2023-05-02 09:00:23 +00:00
version: 1.0 # increment to reset cache
2025-01-06 15:17:54 +00:00
- name: Install uv
uses: astral-sh/setup-uv@v5
2023-05-02 09:00:23 +00:00
with:
2025-01-06 15:17:54 +00:00
version: "0.5.14"
enable-cache: true
cache-dependency-glob: "uv.lock"
2023-05-02 09:00:23 +00:00
2025-01-06 15:17:54 +00:00
- name: "Set up Python"
uses: actions/setup-python@v5
2023-05-02 09:00:23 +00:00
with:
2025-01-06 15:17:54 +00:00
python-version-file: ".python-version"
2023-05-02 09:00:23 +00:00
2025-01-06 14:10:00 +00:00
- name: Restore cached virtualenv
uses: actions/cache/restore@v4
with:
key: venv-${{ runner.os }}-${{ hashFiles('.python-version') }}-${{ hashFiles('pyproject.toml') }}-${{ env.CACHE_SUFFIX }}
path: .venv
2023-05-02 09:00:23 +00:00
- name: Install dependencies
2025-01-06 15:17:54 +00:00
run: uv run ./manage.py install_xapian
2024-06-23 19:04:52 +00:00
shell: bash
2025-01-06 14:10:00 +00:00
- name: Save cached virtualenv
uses: actions/cache/save@v4
with:
key: venv-${{ runner.os }}-${{ hashFiles('.python-version') }}-${{ hashFiles('pyproject.toml') }}-${{ env.CACHE_SUFFIX }}
path: .venv
2023-05-02 09:00:23 +00:00
- name: Compile gettext messages
2025-01-06 15:17:54 +00:00
run: uv run ./manage.py compilemessages
2023-05-02 09:00:23 +00:00
shell: bash