Skip to content

ArtemIsmagilov is testing out GitHub Actions 🚀 #32

ArtemIsmagilov is testing out GitHub Actions 🚀

ArtemIsmagilov is testing out GitHub Actions 🚀 #32

name: GitHub Actions Demo
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
on: [ push ]
jobs:
Explore-GitHub-Actions:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.12" ]
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- shell: 'script --return --quiet --log-out /dev/null --command "bash -e {0}"'
run: |
# install depends
pip install -r requirements.txt
# linting
ruff check
ruff format --check
# start databases
cd movie_service/
docker compose up -d postgres elastic-search redis
until curl --output /dev/null --silent --head --fail http://127.0.0.1:9200; do
printf '.'
sleep 5
done
# init indexes
bash scripts/init_schema_es.bash
# migrate data to elastic
cd etl/
python -m etl.etl_single_migrate
docker compose down postgres
cd ../../
# testing
pytest -sv
# flush all data from cache
docker exec -it redis sh -c "redis-cli FLUSHALL"
# test coverage
coverage run -m pytest
coverage report -m
- name: List files in the repository
run: |
ls ${{ github.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."