40 lines
858 B
YAML
40 lines
858 B
YAML
name: CI
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
ci:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
run: |
|
|
git clone https://${{ gitea.server }}/${{ gitea.repository }} $HOME/repo
|
|
cd $HOME/repo
|
|
git checkout ${{ gitea.sha }}
|
|
|
|
- name: Install Python
|
|
run: |
|
|
python3 -V
|
|
pip3 install --upgrade pip
|
|
|
|
- name: Install pytest
|
|
run: |
|
|
pip3 install pytest
|
|
pytest --version
|
|
|
|
- name: Install project
|
|
run: |
|
|
pip3 install click pyyaml rich
|
|
pip3 install -e .
|
|
i18n-key-sync --help
|
|
|
|
- name: Run tests
|
|
run: |
|
|
cd $HOME/repo
|
|
pytest tests/ -v --tb=short || true
|
|
|
|
- name: Run linting
|
|
run: |
|
|
pip3 install ruff
|
|
ruff check i18n_key_sync/ tests/ || true
|