2021-05-22 01:53:26 +02:00
|
|
|
name: Run local instance of lookyloo to test that current repo
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ main ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
splash-container:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
2022-10-24 11:21:49 +02:00
|
|
|
fail-fast: false
|
2021-05-22 01:53:26 +02:00
|
|
|
matrix:
|
2024-02-05 16:33:46 +01:00
|
|
|
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
|
2021-05-22 01:53:26 +02:00
|
|
|
|
|
|
|
steps:
|
2023-09-05 12:16:58 +02:00
|
|
|
- uses: actions/checkout@v4
|
2021-05-22 01:53:26 +02:00
|
|
|
|
|
|
|
- name: Set up Python ${{matrix.python-version}}
|
2023-12-07 11:31:05 +01:00
|
|
|
uses: actions/setup-python@v5
|
2021-05-22 01:53:26 +02:00
|
|
|
with:
|
|
|
|
python-version: ${{matrix.python-version}}
|
2022-10-09 21:24:02 +02:00
|
|
|
cache: 'poetry'
|
2021-05-22 01:53:26 +02:00
|
|
|
|
2024-03-28 17:00:40 +01:00
|
|
|
- name: Install poetry
|
|
|
|
run: pipx install poetry
|
|
|
|
|
2023-09-25 15:53:17 +02:00
|
|
|
- name: Clone Redis
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
repository: redis/redis
|
2023-09-25 16:00:01 +02:00
|
|
|
path: redis-tmp
|
2023-09-25 15:53:17 +02:00
|
|
|
ref: 7.2
|
|
|
|
|
2021-05-22 01:53:26 +02:00
|
|
|
- name: Install and setup redis
|
|
|
|
run: |
|
2023-09-25 16:00:01 +02:00
|
|
|
mv redis-tmp ../redis
|
2021-05-22 01:53:26 +02:00
|
|
|
pushd ..
|
|
|
|
pushd redis
|
|
|
|
make
|
|
|
|
popd
|
|
|
|
popd
|
|
|
|
|
|
|
|
- name: Install system deps
|
|
|
|
run: |
|
2024-02-23 01:34:49 +01:00
|
|
|
sudo apt install libfuzzy-dev libmagic1
|
2022-04-25 13:57:31 +02:00
|
|
|
# playwright required deps.
|
2023-09-25 11:41:14 +02:00
|
|
|
# sudo apt install libnss3 libnspr4 libatk1.0-0 libatk-bridge2.0-0 libcups2 libxkbcommon0 libxdamage1 libgbm1 libpango-1.0-0 libcairo2 libatspi2.0-0
|
2021-05-22 01:53:26 +02:00
|
|
|
|
|
|
|
- name: Install & run lookyloo
|
|
|
|
run: |
|
|
|
|
echo LOOKYLOO_HOME="'`pwd`'" > .env
|
|
|
|
cp config/generic.json.sample config/generic.json
|
|
|
|
cp config/modules.json.sample config/modules.json
|
2021-12-03 11:32:11 +01:00
|
|
|
poetry install -vvv
|
2022-04-25 13:57:31 +02:00
|
|
|
poetry run playwright install
|
2023-09-25 11:41:14 +02:00
|
|
|
poetry run playwright install-deps
|
2021-05-22 01:53:26 +02:00
|
|
|
poetry run tools/validate_config_files.py --check
|
|
|
|
poetry run tools/validate_config_files.py --update
|
|
|
|
poetry run tools/3rdparty.py
|
|
|
|
poetry run start
|
|
|
|
|
2023-09-25 10:59:39 +02:00
|
|
|
- name: Clone PyLookyloo
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
repository: Lookyloo/PyLookyloo
|
|
|
|
path: PyLookyloo
|
|
|
|
|
2021-05-22 01:53:26 +02:00
|
|
|
- name: Install pylookyloo and run test
|
|
|
|
run: |
|
|
|
|
pushd PyLookyloo
|
|
|
|
poetry install
|
2023-09-25 10:37:02 +02:00
|
|
|
poetry run python -m pytest tests/testing_github.py
|
2021-05-22 01:53:26 +02:00
|
|
|
popd
|
2021-12-03 10:57:50 +01:00
|
|
|
|
|
|
|
- name: Stop instance
|
|
|
|
run: |
|
|
|
|
poetry run stop
|
2023-09-25 11:11:42 +02:00
|
|
|
|
|
|
|
- name: Logs
|
|
|
|
if: ${{ always() }}
|
|
|
|
run: |
|
2023-11-21 11:49:42 +01:00
|
|
|
find -wholename ./logs/*.log -exec cat {} \;
|
|
|
|
find -wholename ./website/logs/*.log -exec cat {} \;
|