Skip to content

update

update #11312

Workflow file for this run

name: Tests
on: [push, pull_request]
jobs:
test:
name: Test
runs-on: ubuntu-20.04
services:
postgres:
image: postgres:12
ports:
- 5432:5432
env:
POSTGRES_USER: invenio
POSTGRES_PASSWORD: dbpass123
elasticsearch:
image: elasticsearch:6.8.23
ports:
- 9200:9200
rabbitmq:
image: rabbitmq:latest
redis:
image: redis:latest
ports:
- 6379:6379
env:
SQLALCHEMY_DATABASE_URI: postgresql+psycopg2://invenio:dbpass123@localhost:5432/wekotest
CACHE_REDIS_URL: redis://localhost:6379/0
SEARCH_ELASTIC_HOSTS: localhost
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
module:
- invenio-communities
- invenio-db
- invenio-deposit
- invenio-files-rest
- invenio-iiif
- invenio-mail
- invenio-oaiharvester
- invenio-oaiserver
- invenio-oauth2server
- invenio-previewer
- invenio-queues
- invenio-records-rest
- invenio-records
- invenio-resourcesyncclient
- invenio-resourcesyncserver
- invenio-s3
- invenio-stats
- weko-accounts
- weko-admin
- weko-authors
- weko-bulkupdate
- weko-deposit
- weko-gridlayout
- weko-groups
- weko-handle
- weko-index-tree
- weko-indextree-journal
- weko-items-autofill
- weko-items-ui
- weko-itemtypes-ui
- weko-logging
- weko-plugins
- weko-records
- weko-records-ui
- weko-schema-ui
- weko-search-ui
- weko-sitemap
- weko-swordserver
- weko-theme
- weko-user-profiles
- weko-workflow
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cache/pip
venv
key: unit-test
- name: Install system packages
run: |
sudo apt-get update
sudo apt-get install python3-setuptools libpq-dev libedit-dev libsqlite3-dev
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: 3.6.15
- name: Create venv
run: python -m venv venv
- name: Install python dependencies
run: |
source venv/bin/activate
python -m pip install -U 'setuptools==57.5.0' wheel 'pip==20.2.4' coveralls PyYAML
pip install -r packages.txt
pip install --no-deps -r packages-invenio.txt
sed -E 's/\/code\///g' requirements-weko-modules.txt | xargs pip install --no-deps
python -m pip uninstall -y 'coverage' 'pytest' 'pytest-cov' 'pytest-invenio' 'mock' 'urllib3' 'responses' 'moto'
python -m pip install 'coverage==4.5.4' 'pytest==5.4.3' 'pytest-cov==2.10.1' 'pytest-invenio==1.3.4' 'mock==3.0.5' 'urllib3==1.21.1' 'responses==0.10.3' 'moto==1.3.5' pytest-mock
- name: Run tests
run: |
source venv/bin/activate
cd modules/${{ matrix.module }}
python -m pip install .
python setup.py test