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

58 lines
1.4 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
- name: Install dependencies
run: |
sudo apt update
sudo apt install gettext
2023-05-02 09:00:23 +00:00
shell: bash
- name: Set up python
2024-09-02 10:42:27 +00:00
uses: actions/setup-python@v5
2023-05-02 09:00:23 +00:00
with:
2024-09-02 10:42:27 +00:00
python-version: "3.12"
2023-05-02 09:00:23 +00:00
- name: Load cached Poetry installation
id: cached-poetry
uses: actions/cache@v3
with:
path: ~/.local
2024-09-02 10:42:27 +00:00
key: poetry-1 # increment to reset cache
2023-05-02 09:00:23 +00:00
- name: Install Poetry
if: steps.cached-poetry.outputs.cache-hit != 'true'
shell: bash
run: curl -sSL https://install.python-poetry.org | python3 -
- name: Check pyproject.toml syntax
shell: bash
run: poetry check
- name: Load cached dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install dependencies
2024-06-24 09:24:08 +00:00
run: poetry install --with docs,tests
2023-05-02 09:00:23 +00:00
shell: bash
2024-06-23 19:04:52 +00:00
- name: Install xapian
run: poetry run ./manage.py install_xapian
shell: bash
2023-05-02 09:00:23 +00:00
- name: Compile gettext messages
run: poetry run ./manage.py compilemessages
shell: bash