Test feeds #547
This file contains hidden or 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: Test feeds | |
on: | |
schedule: | |
- cron: '0 6 * * 3' # Run every Wednesday at 06:00 UTC | |
jobs: | |
debug: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Debug | |
run: echo "${{ toJson(github) }}" | |
testfeeds: | |
if: ${{ github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'tasks:feed') }} | |
runs-on: ubuntu-latest | |
env: | |
YETI_REDIS_HOST: localhost | |
YETI_REDIS_PORT: 6379 | |
YETI_REDIS_DATABASE: 0 | |
YETI_ARANGODB_HOST: localhost | |
YETI_ARANGODB_PORT: 8529 | |
YETI_ARANGODB_DATABASE: yeti | |
YETI_ARANGODB_USERNAME: root | |
YETI_ARANGODB_PASSWORD: "" | |
YETI_AUTH_SECRET_KEY: SECRET | |
YETI_AUTH_ALGORITHM: HS256 | |
YETI_AUTH_ACCESS_TOKEN_EXPIRE_MINUTES: 30 | |
YETI_AUTH_BROWSER_TOKEN_EXPIRE_MINUTES: 43200 | |
YETI_AUTH_ENABLED: False | |
YETI_SYSTEM_PLUGINS_PATH: ./plugins | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | |
sudo apt-get update && sudo apt-get install -y python3-pip && sudo pip3 install uv | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Python dependencies | |
run: uv sync --all-extras | |
- name: Copy dummy config file | |
run: cp yeti.conf.sample yeti.conf | |
- name: Start redis & arangodb conainers | |
run: docker compose -f extras/docker/dev/docker-compose.yaml up -d redis arangodb | |
- name: Start event consumer | |
run: uv run python -m core.events.consumers events & sleep 5 | |
- name: Run test feeds | |
run: | | |
uv run python -m unittest discover -s tests/ -p 'feeds.py' |