Skip to content

Update COMMENTS.md

Update COMMENTS.md #27

Workflow file for this run

name: Back-end CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.13.3
env:
discovery.type: single-node
ports:
- 9200:9200
- 9300:9300
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Wait for Elasticsearch
run: |
echo "Waiting for Elasticsearch to be ready..."
until curl -s http://localhost:9200/_cluster/health | grep -q '"status":"green"\|yellow'; do
echo "Waiting for Elasticsearch to be ready..."
sleep 5
done
shell: bash
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry
poetry install --with dev
working-directory: ./back
- name: Create .env file
run: echo 'ELASTICSEARCH_HOST="localhost"' > .env
working-directory: ./back
- name: Run Unit Tests
run: poetry run python -m unittest discover -s src.tests --verbose
working-directory: ./back
- name: Run Linter
run: poetry run flake8 .
working-directory: ./back