Skip to content

add a cmd to find error in _training_successful #465

add a cmd to find error in _training_successful

add a cmd to find error in _training_successful #465

Workflow file for this run

name: main
on:
push:
pull_request:
workflow_dispatch:
inputs:
ramp_workflow_url:
description: 'pip installable ramp-workflow repo URL'
required: true
default: 'https://github.com/paris-saclay-cds/ramp-workflow/archive/refs/heads/master.zip'
jobs:
main:
name: test-py-${{ matrix.python }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
python: ["3.7", "3.8", "3.9", "3.10"]
include:
- os: ubuntu-20.04
python: 3.8
# the following has no effect with manual trigger
# where the ramp-workflow is specified anyway
ramp_workflow_version: master
services:
postgres:
image: postgres:11.6-alpine
ports:
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ""
# Add a health check
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v3
- name: Setup conda
uses: s-weigand/setup-conda@v1
with:
update-conda: true
activate-conda: false
python-version: ${{ matrix.python }}
conda-channels: anaconda
- name: Create envs
run: |
conda install --yes mamba -n base -c conda-forge
rm -f /usr/share/miniconda/pkgs/cache/*.json # workaround for mamba-org/mamba#488
mamba create --yes -n testenv python=$PYTHON_VERSION
mamba env update -n testenv -f environment.yml
mamba env create -f ci_tools/environment_iris_kit.yml
env:
PYTHON_VERSION: ${{ matrix.python }}
- name: Install ramp-board
run: |
source activate testenv
if [ "$PYTHON_VERSION" == "3.8" ]; then
python -m pip install "dask==2021.4.1" "distributed==2021.4.1"
fi
if [ "${{ matrix.ramp_workflow_version }}" == "master" ]; then
pip install https://github.com/paris-saclay-cds/ramp-workflow/archive/refs/heads/master.zip
fi
if [ "${{ github.event.inputs.ramp_workflow_url }}" != "" ]; then
pip install "${{ github.event.inputs.ramp_workflow_url }}"
fi
make inplace
env:
PYTHON_VERSION: ${{ matrix.python }}
- name: Test ramp-frontend
run: |
set -e
source activate testenv
python -m smtpd -n -c DebuggingServer 127.0.0.1:8025 &
sleep 3 # wait for the server to start
pytest -rvsl ramp-frontend --cov=ramp_frontend --cov-report=term-missing --cov-report=xml --cov-append
- name: Test ramp-engine
run: |
set -e
source activate testenv
pytest -rvsl ramp-engine/ --cov=ramp_engine --cov-report=term-missing --cov-report=xml --cov-append
- name: Test ramp-database
run: |
set -e
source activate testenv
pytest -rvsl ramp-database/ --cov=ramp_database --cov-report=term-missing --cov-report=xml --cov-append
- name: Test ramp-utils
run: |
set -e
source activate testenv
pytest -rvsl ramp-utils/ --cov=ramp_utils --cov-report=term-missing --cov-report=xml --cov-append
- name: Test integration
run: |
set -e
source activate testenv
bash ci_tools/actions/integration_test.sh
- uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
verbose: true
file: ./coverage.xml
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.7'
- name: Install dependencies
run: pip install flake8 black==22.3.0
- name: Run flake8
run: flake8 ramp-*
- name: Run black
run: black --check .