Skip to content

Create ci.yml

Create ci.yml #29

Workflow file for this run

name: CI Pipeline
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
services:
redis:
image: docker.io/redis:7.0-alpine
options: --health-cmd="redis-cli ping" --health-interval=5s --health-timeout=5s --health-retries=5
ports:
- 6379:6379
db:
image: groonga/pgroonga:latest
options: --health-cmd="pg_isready --user=\$POSTGRES_USER --dbname=\$POSTGRES_DB" --health-interval=5s --health-timeout=5s --health-retries=5
env:
POSTGRES_USER: example_user
POSTGRES_DB: example_db
ports:
- 5432:5432
volumes:
- db_data:/var/lib/postgresql/data
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Copy example configuration files
run: |
cp docker-compose.example.yml docker-compose.yml
cp .config/example.yml .config/default.yml
cp .config/docker_example.env .config/docker.env
- name: Pull and run Docker Compose
run: |
docker-compose -f docker-compose.yml up -d # Levanta los servicios usando la imagen de Docker Hub.
- name: Run tests (si tienes alguna prueba)
run: |
# AquΓ­ agregas los comandos necesarios para tus pruebas, por ejemplo, si usas Jest o Mocha:
docker-compose exec web npm run test
- name: Shutdown Docker Compose
run: docker-compose down
volumes:

Check failure on line 63 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / CI Pipeline

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 63, Col: 1): Unexpected value 'volumes'
db_data: