WIP: python3.10/11, opensearch, invenio upgrades #2357
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: Backend tests | |
on: | |
push: | |
branches: [master, next] | |
paths-ignore: | |
- "ui/**" | |
pull_request: | |
branches: [master, next] | |
paths-ignore: | |
- "ui/**" | |
jobs: | |
lint-python-changes: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Run darker | |
run: | | |
pip install flake8 | |
pip install darker[isort] | |
darker . --check -i -L flake8 | |
python-tests: | |
runs-on: ubuntu-20.04 | |
services: | |
redis: | |
image: redis | |
ports: | |
- 6379:6379 | |
postgres: | |
image: postgres:9.6 | |
env: | |
POSTGRES_USER: cap | |
POSTGRES_PASSWORD: cap | |
POSTGRES_DB: cap | |
ports: | |
- 5432:5432 | |
rabbitmq: | |
image: rabbitmq:3-management | |
ports: | |
- 5672:5672 | |
search: | |
image: opensearchproject/opensearch:2.2.0 | |
env: | |
node.name: search | |
bootstrap.memory_lock: true | |
OPENSEARCH_JAVA_OPTS: -Xms1024m -Xmx1024m | |
discovery.type: single-node | |
discovery.seed_hosts: search | |
DISABLE_SECURITY_PLUGIN: true | |
ports: | |
- 9200:9200 | |
options: >- | |
--health-cmd "curl http://localhost:9200/_cluster/health" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 10 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install libsasl2-dev python3-dev libldap2-dev libssl-dev libkrb5-dev | |
- name: Install dependencies | |
run: | | |
pip install . | |
- name: Run integration and unit tests | |
run: ./run-tests.sh --check-pytest | |
- name: Codecov Coverage | |
uses: codecov/codecov-action@v1 | |
with: | |
files: coverage.xml |