Set up Forgejo CI
All checks were successful
Test / pytest (push) Successful in 20s

This commit is contained in:
polyfloyd 2025-03-23 14:05:06 +01:00
parent cdf651b804
commit e72d1d2aee
4 changed files with 32 additions and 4 deletions

View file

@ -0,0 +1,30 @@
name: Test
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_call:
env:
SLIGRO_USERNAME: ${{ secrets.SLIGRO_USERNAME }}
SLIGRO_PASSWORD: ${{ secrets.SLIGRO_PASSWORD }}
jobs:
pytest:
runs-on: docker
container:
image: alpine:latest
steps:
- run: apk add nodejs py3-pip ruff
- uses: actions/checkout@v4
- run: pip install -r requirements.txt --break-system-packages
- run: pytest
- run: ruff check

View file

@ -2,7 +2,6 @@ from dataclasses import dataclass
from decimal import Decimal, ROUND_UP
from typing import Dict, Optional, List
import logging
import re
import scrapers
import shlex
@ -79,7 +78,7 @@ def update_product_pricings(src):
for line in src.split('\n'):
try:
product = Product.from_line(line)
except Exception as err:
except Exception:
lines_out.append(line)
continue

View file

@ -6,7 +6,6 @@ import json
import re
import os
import requests
import subprocess
import logging
from supermarktconnector.ah import AHConnector
from typing import List

View file

@ -1,4 +1,4 @@
from scrapers import *
from scrapers import ah_get_by_gtin, sligro_get_by_gtin, parse_content_description, Product
def test_scrape_ah():