lookyloo/.github/workflows/instance_test.yml

107 lines
2.9 KiB
YAML
Raw Permalink Normal View History

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-11-06 14:53:25 +01:00
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
2021-05-22 01:53:26 +02:00
steps:
- uses: actions/checkout@v4
2021-05-22 01:53:26 +02:00
- name: Set up Python ${{matrix.python-version}}
uses: actions/setup-python@v5
2021-05-22 01:53:26 +02:00
with:
python-version: ${{matrix.python-version}}
- name: Install poetry
run: pipx install poetry
2024-10-17 17:45:44 +02:00
- name: Clone Valkey
2023-09-25 15:53:17 +02:00
uses: actions/checkout@v4
with:
2024-10-17 17:45:44 +02:00
repository: valkey-io/valkey
path: valkey-tmp
ref: "8.0"
2023-09-25 15:53:17 +02:00
2024-10-17 17:45:44 +02:00
- name: Install and setup valkey
2021-05-22 01:53:26 +02:00
run: |
2024-10-17 17:45:44 +02:00
mv valkey-tmp ../valkey
2021-05-22 01:53:26 +02:00
pushd ..
2024-10-17 17:45:44 +02:00
pushd valkey
2021-05-22 01:53:26 +02:00
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.
# 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
2024-04-11 14:56:14 +02:00
- name: Clone uwhoisd
uses: actions/checkout@v4
with:
2024-04-11 15:32:49 +02:00
repository: Lookyloo/uwhoisd
2024-04-11 15:22:36 +02:00
path: uwhoisd-tmp
2024-04-11 14:56:14 +02:00
- name: Install uwhoisd
run: |
sudo apt install whois
2024-04-11 15:22:36 +02:00
mv uwhoisd-tmp ../uwhoisd
pushd ..
2024-04-11 14:56:14 +02:00
pushd uwhoisd
poetry install
echo UWHOISD_HOME="'`pwd`'" > .env
poetry run start
popd
2024-04-11 15:22:36 +02:00
popd
2024-04-11 15:15:26 +02:00
2024-04-11 14:56:14 +02:00
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
2024-04-12 11:26:34 +02:00
cp config/takedown_filters.ini.sample config/takedown_filters.ini
2021-12-03 11:32:11 +01:00
poetry install -vvv
poetry run playwright install-deps
2024-03-29 18:20:39 +01:00
poetry run playwright install
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
2024-04-11 14:56:14 +02:00
jq '.UniversalWhois.enabled = true' config/modules.json > temp.json && mv temp.json config/modules.json
2021-05-22 01:53:26 +02:00
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: |
find -wholename ./logs/*.log -exec cat {} \;
find -wholename ./website/logs/*.log -exec cat {} \;