Skip to content

Adding REST rtf only pipeline, cleaning up Java warnings, adjusting to MTAP changes #993

Adding REST rtf only pipeline, cleaning up Java warnings, adjusting to MTAP changes

Adding REST rtf only pipeline, cleaning up Java warnings, adjusting to MTAP changes #993

Workflow file for this run

name: Continuous Integration
on:
pull_request:
branches: main
schedule:
- cron: 0 8 * * *
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 2
matrix:
python-version: ['3.9', '3.11']
include:
- java-version: '11'
python-version: '3.9'
- java-version: '21'
python-version: '3.11'
name: ubuntu-latest, py${{ matrix.python-version }}, java${{ matrix.java-version }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v3
id: cache
with:
path: ~/.biomedicus/data
key: ${{ hashFiles('python/biomedicus/data_version.py') }}
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java-version }}
- uses: actions/setup-go@v5
with:
go-version: '1.20'
- name: Install dependencies (not release)
if: ${{ !startsWith(github.head_ref, 'release') && success() }}
run: |
python -m pip install --upgrade pip setuptools wheel
pip install flake8 pytest
pip install git+https://github.com/nlpie/mtap@main#egg=mtap ./biomedicus_client .[test,stanza] --extra-index-url https://download.pytorch.org/whl/cpu
go install github.com/nlpie/mtap/go/mtap-gateway@latest
- name: Install dependencies (release)
if: ${{ startsWith(github.head_ref, 'release') && success() }}
run: |
python -m pip install --upgrade pip setuptools wheel
pip install flake8 pytest
SETUPTOOLS_SCM_PRETEND_VERSION=${GITHUB_HEAD_REF##*/} pip install ./biomedicus_client .[test,stanza] --extra-index-url https://download.pytorch.org/whl/cpu
go install github.com/nlpie/mtap/go/mtap-gateway@latest
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Download models
run: b9 download-data --with-stanza
- name: Test with pytest
run: pytest -s python/tests --integration --timeout 120.0