This repository has been archived by the owner on May 3, 2024. It is now read-only.
chore(deps): update npm development dependencies (major) #479
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Calidad 👌🧪 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
on: | |
pull_request: | |
paths-ignore: | |
- "**/*.md" | |
merge_group: | |
workflow_dispatch: | |
jobs: | |
dependency-review: | |
name: Vulnerabilidades en dependencias 🔎 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clonar repositorio ⬇️ | |
uses: actions/checkout@v4.1.1 | |
with: | |
show-progress: false | |
- name: Buscar dependencias vulnerables 🦠 | |
uses: actions/dependency-review-action@v3.1.4 | |
with: | |
## Workaround from https://github.com/actions/dependency-review-action/issues/456 | |
## TODO: Remove when necessary | |
base-ref: ${{ github.event.pull_request.base.sha || 'master' }} | |
head-ref: ${{ github.event.pull_request.head.sha || github.ref }} | |
conventional_commits: | |
name: Convención de commits 💬 | |
if: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clonar repositorio ⬇️ | |
uses: actions/checkout@v4.1.1 | |
with: | |
show-progress: false | |
- name: Verificar cumplimiento 📝 | |
uses: webiny/action-conventional-commits@v1.2.0 | |
run_backend: | |
name: Iniciar 🏃♂️ | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:latest | |
env: | |
POSTGRES_USER: decide | |
POSTGRES_PASSWORD: decide | |
POSTGRES_DB: decide | |
ports: | |
- 5432:5432 | |
# Necesario porque el contenedor no tiene comprobaciones de su salud | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
defaults: | |
run: | |
working-directory: decide | |
steps: | |
- name: Clonar repositorio ⬇️ | |
uses: actions/checkout@v4.1.1 | |
with: | |
show-progress: false | |
- name: Configurar Python 🐍 | |
uses: actions/setup-python@v5.0.0 | |
with: | |
python-version: '3.x' | |
check-latest: true | |
- name: Instalar dependencias 📦 | |
run: | | |
# Necesario a partir de Python 3.12: https://github.com/Becksteinlab/GromacsWrapper/issues/263#issue-1966724749 | |
echo "setuptools" >> ../requirements.txt | |
pip install -r ../requirements.txt | |
- name: Aplicar migraciones 🗃️ | |
run: python ./manage.py migrate | |
- name: Iniciar servidor de Decide (Django) 🏃♂️ | |
run: | | |
python manage.py runserver 127.0.0.1:8000 & | |
sleep 10 # Espera a que el servidor esté listo | |
- name: Comprobar si responde a peticiones 🩺 | |
run: | | |
curl -I http://127.0.0.1:8000/ | |
sudo pkill python | |
lint_frontends: | |
name: Lint (frontend) 🔬 | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
module: | |
- "booth" | |
defaults: | |
run: | |
working-directory: decide/${{ matrix.module }}/frontend | |
steps: | |
- name: Clonar ⬇️ | |
uses: actions/checkout@v4.1.1 | |
with: | |
show-progress: false | |
- name: Configurar entorno Node.js ⚙️ | |
uses: actions/setup-node@v4.0.1 | |
with: | |
node-version: 20 | |
check-latest: true | |
- name: Instalar dependencias 📦 | |
run: npm ci --no-audit | |
- name: Ejecutar linter ✏️ | |
run: npm run lint | |
typecheck_frontends: | |
name: Comprobación de tipos 🈯 | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
module: | |
- "booth" | |
defaults: | |
run: | |
working-directory: decide/${{ matrix.module }}/frontend | |
steps: | |
- name: Clonar ⬇️ | |
uses: actions/checkout@v4.1.1 | |
with: | |
show-progress: false | |
- name: Configurar entorno Node.js ⚙️ | |
uses: actions/setup-node@v4.0.1 | |
with: | |
node-version: 20 | |
check-latest: true | |
- name: Instalar dependencias 📦 | |
run: npm ci --no-audit | |
- name: Ejecutar comprobación de tipos 📖 | |
run: npm run typecheck | |
build_frontends: | |
name: Construir cliente 🏗️ | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
module: | |
- "booth" | |
defaults: | |
run: | |
working-directory: decide/${{ matrix.module }}/frontend | |
steps: | |
- name: Clonar ⬇️ | |
uses: actions/checkout@v4.1.1 | |
with: | |
show-progress: false | |
- name: Configurar entorno Node.js ⚙️ | |
uses: actions/setup-node@v4.0.1 | |
with: | |
node-version: 20 | |
check-latest: true | |
- name: Instalar dependencias 📦 | |
run: npm ci --no-audit | |
- name: Construir 🛠️ | |
run: npm run build | |
test_frontends: | |
name: Pruebas unitarias (cliente) 🧫 | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
module: | |
- "booth" | |
defaults: | |
run: | |
working-directory: decide/${{ matrix.module }}/frontend | |
steps: | |
- name: Clonar ⬇️ | |
uses: actions/checkout@v4.1.1 | |
with: | |
show-progress: false | |
- name: Configurar entorno Node.js ⚙️ | |
uses: actions/setup-node@v4.0.1 | |
with: | |
node-version: 20 | |
check-latest: true | |
- name: Instalar dependencias 📦 | |
run: npm ci --no-audit | |
- name: Construir 🛠️ | |
run: npm run test |