Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 44 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,37 @@
# refresh: 2025-09-10T11:19:24Z
name: CI

on:
push:
branches: [ main, "feat/**", "fix/**", "ci/**", "docs/**", "chore/**" ]
pull_request:
branches: [ main ]
workflow_dispatch: {}
permissions: { contents: read }
concurrency: { group: ci-${{ github.ref }}, cancel-in-progress: true }

permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
python-linux:
name: Python (Linux, ${{ matrix.python-version }})
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
runs-on: ubuntu-latest
strategy: { fail-fast: false, matrix: { python-version: [ "3.11", "3.12" ] } }
strategy:
fail-fast: false
matrix:
python-version: [ "3.11", "3.12" ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: { python-version: ${{ matrix.python-version }} }
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
python -m pip install --upgrade pip
pip install poetry==1.8.3
pip install "poetry==1.8.3"
poetry --version
- name: Install deps
run: poetry install --no-interaction
Expand All @@ -33,21 +43,38 @@ jobs:
run: PYTHONPATH=src poetry run pytest -q --disable-warnings
- name: Mypy
run: poetry run mypy .

node-linux:
name: Node (Linux)
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 20, cache: npm }
- run: npm ci
- run: npx eslint . --max-warnings=0
- run: npx prettier -c . --ignore-unknown
- run: |
if [ -f tsconfig.json ]; then npx tsc -p tsconfig.json --noEmit; else echo "Sin TypeScript"; fi
- run: |
if jq -e '.scripts.test' package.json >/dev/null 2>&1; then npm test; else echo "Sin tests Node"; fi
with:
node-version: 20
cache: npm
- name: Install deps
run: npm ci
- name: ESLint
run: npx eslint . --max-warnings=0
- name: Prettier
run: npx prettier -c . --ignore-unknown
- name: Type-check
run: |
if [ -f tsconfig.json ]; then
npx tsc -p tsconfig.json --noEmit
else
echo "Sin TypeScript"
fi
- name: Tests
run: |
if jq -e '.scripts.test' package.json >/dev/null 2>&1; then
npm test
else
echo "Sin tests Node"
fi

python-windows:
name: Python (Windows opcional)
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
Expand All @@ -56,11 +83,12 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: { python-version: "3.12" }
with:
python-version: "3.12"
- name: Install Poetry
run: |
python -m pip install --upgrade pip
pip install poetry==1.8.3
pip install "poetry==1.8.3"
poetry --version
- name: Install deps
run: poetry install --no-interaction
Expand Down