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

ci(actions): add quality checks #3

ci(actions): add quality checks

ci(actions): add quality checks #3

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"
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 estado
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Clonar ⬇️
uses: actions/[email protected]
with:
show-progress: false
- name: Configurar Python 🐍
uses: actions/[email protected]
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 }}