Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

chore(deps): update npm development dependencies #559

chore(deps): update npm development dependencies

chore(deps): update npm development dependencies #559

Workflow file for this run

name: Decide 🗳️
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
pull_request:
paths-ignore:
- "**/*.md"
merge_group:
workflow_dispatch:
push:
branches:
- master
paths-ignore:
- "**/*.md"
jobs:
test:
name: Pruebas unitarias 🧪
runs-on: ubuntu-latest
defaults:
run:
working-directory: decide
strategy:
fail-fast: false
matrix:
module:
- "authentication"
- "base"
- "booth"
- "census"
- "decide"
- "gateway"
- "mixnet"
- "postproc"
- "store"
- "test-scripts"
- "visualizer"
- "voting"
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
steps:
- name: Clonar ⬇️
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: |
sudo apt update
sudo apt install libpq-dev chromium-browser chromium-chromedriver
echo "pynose==1.4.8" >> ../requirements.txt
echo "selenium" >> ../requirements.txt
echo "coverage" >> ../requirements.txt
# 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
cp local_settings.gactions.py local_settings.py
- name: Aplicar migraciones 🗃️
run: |
python manage.py migrate
- name: Ejecutar pruebas 🔬
run: |
python manage.py test ${{ matrix.module }}
docker:
name: Construir imágenes de Docker 💿💻
runs-on: ubuntu-latest
steps:
- name: Clonar ⬇️
uses: actions/checkout@v4.1.1
with:
show-progress: false
- name: Configurar QEMU ⚙️
if: ${{ github.event_name == 'push' }}
uses: docker/setup-qemu-action@v3.0.0
- name: Configurar Docker Buildx ⚙️
uses: docker/setup-buildx-action@v3.0.0
- name: Iniciar sesión en GitHub Container Registry 🔑
uses: docker/login-action@v3.0.0
if: ${{ github.event_name == 'push' }}
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.DECIDE_PROJECT_SECRET }}
- name: Construir y publicar imágenes de Docker 🛠️⬆️
uses: docker/build-push-action@v5.1.0
with:
context: .
file: packaging/docker/Dockerfile
push: ${{ github.event_name == 'push' }}
load: ${{ github.event_name == 'pull_request' }}
platforms: ${{ github.event_name == 'push' && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
tags: |
ghcr.io/us-ferferga/decide:latest
- name: Extraer la imagen de Docker 📦
if: ${{ github.event_name == 'pull_request' }}
run: |
docker save ghcr.io/us-ferferga/decide:latest > docker_image.tar.gz
- name: Subir artefacto (imagen de Docker) ⬆️📦
uses: actions/upload-artifact@v4.0.0
if: ${{ github.event_name == 'pull_request' }}
with:
compression-level: 0
name: docker_image
path: |
docker_image.tar.gz