Skip to content

[WIP] add selenium test integration #2

[WIP] add selenium test integration

[WIP] add selenium test integration #2

Workflow file for this run

---
name: Integration tests
on:
push:
branches: [master, develop]
pull_request:
branches: ["*"]
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: ['3.10']
steps:
- uses: actions/checkout@v3
- uses: browser-actions/setup-geckodriver@latest
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure sysctl limits (for ES)
run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# Remove apt repos that are known to break from time to time
# See https://github.com/actions/virtual-environments/issues/323
- name: Remove broken apt repos [Ubuntu]
run: |
for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done
- name: Install Dependencies
run: |
sudo apt-get clean
sudo apt-get update
sudo apt-get install ffmpeg
sudo apt-get install -y ffmpegthumbnailer
sudo apt-get install -y npm
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
sudo npm install -g yarn
- name: Runs Elasticsearch
uses: elastic/elastic-github-actions/elasticsearch@refactor_with_plugins
with:
# stack-version: 7.6.0
stack-version: 6.8.23
plugins: analysis-icu
- name: Setup Pod
run: |
coverage run --source='.' manage.py create_pod_index --settings=pod.main.test_settings
python manage.py makemigrations --settings=pod.main.test_settings
python manage.py migrate --settings=pod.main.test_settings
cd pod
yarn
- name: Run Tests
run: |
export DISPLAY=:99
geckodriver &
Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
python manage.py test -v 3 --settings=pod.main.test_settings pod.main.integration_tests.selenium_pod_integration_tests