Skip to content

mattbild is testing Pod encoding 🚀 #3

mattbild is testing Pod encoding 🚀

mattbild is testing Pod encoding 🚀 #3

Workflow file for this run

name: Pod Encoding Full Docker
run-name: ${{ github.actor }} is testing Pod encoding 🚀
on:
push:
branches:
- main
- master
- develop
- features/**
- dependabot/**
pull_request:
branches:
- main
- master
- develop
env:
DJANGO_SUPERUSER_USERNAME: "admin"
DJANGO_SUPERUSER_PASSWORD: "passwd"
DJANGO_SUPERUSER_EMAIL: "noreplay@uni.fr"
ELASTICSEARCH_TAG: "elasticsearch:7.17.18"
ELASTICSEARCH_VERION: "elasticsearch:7.17.18"
NODE_TAG: "node:19"
PYTHON_TAG: "python:3.9-buster"
REDIS_TAG: "redis:alpine3.16"
DOCKER_ENV: "full"
GECKODRIVER_VER: "v0.29.0"
FIREFOX_VER: "87.0"
jobs:
Pod-Docker-Encoding-Actions:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: List files in the repository
run: |
ls ${{ github.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."
- name: Create settings local file
run: |
mv pod/custom/settings_local_docker_full_test.py pod/custom/settings_local.py
- name: cat settings local
run: cat pod/custom/settings_local.py
- name: Create env file containers
run: |
touch .env.dev
echo DJANGO_SUPERUSER_USERNAME=$DJANGO_SUPERUSER_USERNAME >> .env.dev
echo DJANGO_SUPERUSER_PASSWORD=$DJANGO_SUPERUSER_PASSWORD >> .env.dev
echo DJANGO_SUPERUSER_EMAIL=$DJANGO_SUPERUSER_EMAIL >> .env.dev
echo ELASTICSEARCH_TAG=$ELASTICSEARCH_TAG >> .env.dev
echo ELASTICSEARCH_VERSION=$ELASTICSEARCH_TAG >> .env.dev
echo NODE_TAG=$NODE_TAG >> .env.dev
echo PYTHON_TAG=$PYTHON_TAG >> .env.dev
echo REDIS_TAG=$REDIS_TAG >> .env.dev
echo DOCKER_ENV=full >> .env.dev
echo GECKODRIVER_VER=v0.29.0
echo FIREFOX_VER=87.0
- name: cat env
run: cat .env.dev
- name: make Build container
run: |
sudo rm -rf ./pod/log
sudo rm -rf ./pod/static
sudo rm -rf ./pod/node_modules
docker-compose -f ./docker-compose-full-dev-with-volumes.yml -p esup-pod build --build-arg ELASTICSEARCH_VERSION=$ELASTICSEARCH_TAG --build-arg NODE_VERSION=$NODE_TAG --build-arg PYTHON_VERSION=$PYTHON_TAG --no-cache
docker-compose -f ./docker-compose-full-dev-with-volumes.yml up --detach --force-recreate --always-recreate-deps
- name: Sleep for 60 seconds to wait run server on pod back
uses: jakejarvis/wait-action@master
with:
time: '60s'
- name: show running container
run: docker ps
- run: |
echo "🍏 Docker is UP ${{ job.status }}."
docker exec pod-back-with-volumes ps auxf
- name: run test in docker
run: docker exec pod-back-with-volumes coverage run --source='.' manage.py test_encode_transcript
- name: Stop containers
if: always()
run: docker-compose -f ./docker-compose-full-dev-with-volumes.yml down
- run: echo "END"