feat(spiders): peru_osce: point to production URL #3290
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: pip | |
cache-dependency-path: '**/requirements*.txt' | |
# Don't install editable projects in the current working directory. | |
# https://pip.pypa.io/en/latest/reference/pip_install/#install-src | |
- run: pip install --src $GITHUB_WORKSPACE/../src -r requirements_dev.txt | |
- env: | |
KINGFISHER_COLLECT_DATABASE_URL: postgresql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/postgres | |
# Use 127.0.0.1 to avoid log messages about IPv6. | |
RABBIT_URL: amqp://127.0.0.1:${{ job.services.rabbitmq.ports[5672] }} | |
TEST_API_URL: http://localhost:${{ job.services.httpbin.ports[80] }}/anything/ | |
# For requests.post() in KingfisherProcessAPI2._post_synchronous(). | |
run: pytest -W error -W ignore::ResourceWarning -rs --cov kingfisher_scrapy | |
- env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: coveralls --service=github | |
services: | |
postgres: | |
image: postgres:15 | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432/tcp | |
rabbitmq: | |
image: rabbitmq:latest | |
options: >- | |
--health-cmd "rabbitmq-diagnostics -q check_running" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5672/tcp | |
httpbin: | |
image: kennethreitz/httpbin:latest | |
ports: | |
- 80/tcp |