Skip to content

Unit & Integration Tests #368

Unit & Integration Tests

Unit & Integration Tests #368

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Unit & Integration Tests
# env:
# DISABLED_SCRAPPERS: BAREKET
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '00 17 1/3 * *'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: self-hosted
strategy:
fail-fast: false
matrix:
python-version: ["3.11.0"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Free disk space
run: |
df --human-readable
sudo apt clean
docker 2>/dev/null 1>&2 rmi $(docker image ls --all --quiet) || true
rm --recursive --force "$AGENT_TOOLSDIRECTORY"
df --human-readable
- name: Build with Docker
run: docker build -t erlichsefi/israeli-supermarket-scarpers:test --target test .
- name: Test with pytest
run: docker run --rm --name test-run -e DISABLED_SCRAPPERS="${{ env.DISABLED_SCRAPPERS }}" erlichsefi/israeli-supermarket-scarpers:test