Skip to content

update: no ignorar los archivos de la carpeta data #21

update: no ignorar los archivos de la carpeta data

update: no ignorar los archivos de la carpeta data #21

name: Fotocasa Scraper CI
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: "0 9 * * 1" # Ejecutar todos los lunes a las 9:00 UTC
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Install Chrome and Chromedriver
run: |
sudo apt-get update
sudo apt-get install -y wget
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install -y ./google-chrome-stable_current_amd64.deb
sudo apt-get install -y chromium-browser chromium-chromedriver
- name: Verify Chromium and Chromedriver
run: |
echo "Chromium binary:"
which chromium
chromium --version
echo "Chromedriver binary:"
which chromedriver
chromedriver --version
- name: Create symlinks (if necessary)
run: |
sudo ln -s /snap/bin/chromium /usr/bin/google-chrome || echo "Symlink already exists"
sudo ln -s /usr/bin/chromedriver /usr/local/bin/chromedriver || echo "Symlink already exists"
- name: Verify Chromium works
run: |
chromium --headless --disable-gpu --dump-dom https://www.example.com || echo "Chromium failed to run"
- name: Run Python script
run: python main.py