mirror of
https://github.com/elisiariocouto/leggen.git
synced 2025-12-11 16:12:22 +00:00
61 lines
1.3 KiB
YAML
61 lines
1.3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: ["main", "dev"]
|
|
pull_request:
|
|
branches: ["main", "dev"]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
test-python:
|
|
name: Test Python
|
|
runs-on: ubuntu-latest
|
|
if: "!contains(github.event.head_commit.message, 'chore(ci): Bump version to')"
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v5
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version-file: "pyproject.toml"
|
|
|
|
- name: Create config directory for tests
|
|
run: |
|
|
mkdir -p ~/.config/leggen
|
|
cp config.example.toml ~/.config/leggen/config.toml
|
|
|
|
- name: Run Python tests
|
|
run: uv run pytest
|
|
|
|
test-frontend:
|
|
name: Test Frontend
|
|
runs-on: ubuntu-latest
|
|
if: "!contains(github.event.head_commit.message, 'chore(ci): Bump version to')"
|
|
defaults:
|
|
run:
|
|
working-directory: ./frontend
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
cache: "npm"
|
|
cache-dependency-path: frontend/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
- name: Run lint
|
|
run: npm run lint
|
|
|
|
- name: Run build
|
|
run: npm run build
|