From 18f5eb4f4275bd354d8fc5786bea88fe45d8b0bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Fri, 21 May 2021 12:11:29 -0700 Subject: [PATCH] chg: try splash docker in gh actions --- .github/workflows/instance_test.yml | 85 +++++++++++++++-------------- 1 file changed, 44 insertions(+), 41 deletions(-) diff --git a/.github/workflows/instance_test.yml b/.github/workflows/instance_test.yml index 2fb47562..3605cddb 100644 --- a/.github/workflows/instance_test.yml +++ b/.github/workflows/instance_test.yml @@ -1,4 +1,4 @@ -name: Run local instance of lookyloo to test that current repo +name: Run local instance of lookyloo to test that current repo on: push: @@ -7,46 +7,49 @@ on: branches: [ main ] jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: [3.8, 3.9] + splash-container: + image: scrapinghub:splash + options: --disable-browser-caches + ports: + - 8050:8050 + - 5023:5023 - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{matrix.python-version}} - uses: actions/setup-python@v2 - with: - python-version: ${{matrix.python-version}} + lookyloo-container: + build: - - name: Install & run splash - run: | - sudo apt install docker.io - sudo docker pull spcrapinghub/splash - sudo docker run -p 8050:8050 -p 5023:5023 scrapinghub/splash --disable-browser-caches - - - name: Install and setup redis - run: | - git clone https://github.com/antirez/redis.git - cd redis - git checkout 6.0 - make - cd .. - - - name: Install & run lookyloo - run: | - git clone https://github.com/Lookyloo/lookyloo.git - cd lookyloo - poetry install - echo LOOKYLOO_HOME="'`pwd`'" > .env - cp config/generic.json.sample config/generic.json - cp config/modules.json.sample config/modules.json - poetry run update --yes - cd .. - - - name: Install pylookyloo and run test - run: | - git clone https://github.com/Lookyloo/PyLookyloo.git - python PyLookyloo/pylookyloo/testing_github.py + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.8, 3.9] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{matrix.python-version}} + uses: actions/setup-python@v2 + with: + python-version: ${{matrix.python-version}} + + - name: Install and setup redis + run: | + git clone https://github.com/antirez/redis.git + cd redis + git checkout 6.0 + make + cd .. + + - name: Install & run lookyloo + run: | + git clone https://github.com/Lookyloo/lookyloo.git + cd lookyloo + poetry install + echo LOOKYLOO_HOME="'`pwd`'" > .env + cp config/generic.json.sample config/generic.json + cp config/modules.json.sample config/modules.json + poetry run update --yes + cd .. + + - name: Install pylookyloo and run test + run: | + git clone https://github.com/Lookyloo/PyLookyloo.git + python PyLookyloo/pylookyloo/testing_github.py