Skip to content

Merge pull request #1 from Segfaul/dev #5

Merge pull request #1 from Segfaul/dev

Merge pull request #1 from Segfaul/dev #5

Workflow file for this run

name: Dotaverse CI Pipeline
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test_backend:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11.6"]
services:
redis:
image: redis
ports:
- 6379:6379
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Copy .env.example to .env
run: |
cp .env.example backend/.env
- name: Run tests
run: |
pytest
working-directory: ./backend
build_frontend:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: |
npm install
working-directory: ./frontend
- name: Build frontend
run: |
npm run build
working-directory: ./frontend
build_docker_compose:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Copy .env.example to .env
run: |
cp .env.example .env
- name: Build Docker images
run: |
docker compose -f docker-compose.dev.yml build