Skip to content

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #1511

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #1511

Workflow file for this run

name: RBC
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
pull_request:
branches:
- main
# kill any previous running job on a new commit
concurrency:
group: build-and-test-rbc-${{ github.head_ref }}
cancel-in-progress: true
jobs:
lint:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-tests') }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
- name: Install flake8
run: |
pip install flake8
- name: Lint:flake8
run: |
flake8 .
remotejit:
name: ${{ matrix.os }} - Python v${{ matrix.python-version }} - Numba v${{ matrix.numba-version }}
runs-on: ${{ matrix.os }}
strategy:
# setting fail-fast=true seems to cause connection issues in remotejit tests
fail-fast: false
matrix:
include:
- os: ubuntu-latest
python-version: '3.10'
numba-version: '0.55'
needs: [lint, heavydb]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
channel-priority: strict
channels: conda-forge
- name: Install mamba
shell: bash -l {0}
run: |
conda install mamba -c conda-forge
- name: Configure miniconda
shell: bash -l {0}
run: |
conda env config vars set MAMBA_NO_BANNER=1
- name: Create rbc test environment v${{ matrix.python-version }}
shell: bash -l {0}
run: |
cat environment.yml > rbc_test.yaml
echo " - numba=${{ matrix.numba-version }}" >> rbc_test.yaml
echo " - python=${{ matrix.python-version }}" >> rbc_test.yaml
mamba env create --file=rbc_test.yaml -n rbc
- name: rbc conda config
shell: bash -l {0}
run: mamba run -n rbc conda config --show
- name: rbc conda list
shell: bash -l {0}
run: |
mamba run -n rbc conda list
- name: Develop rbc
shell: bash -l {0}
run: |
mamba run -n rbc python setup.py develop
- name: Run rbc tests
shell: bash -l {0}
env:
EXPECTED_PYTHON_VERSION: ${{ matrix.python-version }}
EXPECTED_NUMBA_VERSION: ${{ matrix.numba-version }}
run: |
mamba run -n rbc pytest -sv -r A rbc/ -x
heavydb:
name: Heavydb ${{ matrix.heavydb-version }} - ${{ matrix.os }} - Numba v${{matrix.numba-version}} - Python v${{ matrix.python-version }} [${{ matrix.heavydb-from }}]
runs-on: ${{ matrix.os }}
timeout-minutes: 35
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.10', '3.9', '3.8']
numba-version: ['0.56', '0.55']
heavydb-version: ['6.2', '6.1', '6.0']
heavydb-from: [conda]
# include:
# - os: ubuntu-latest
# python-version: '3.10'
# numba-version: '0.56'
# heavydb-version: dev
# docker-image: heavyai/core-os-cpu-dev:latest
# heavydb-from: docker
# - os: ubuntu-latest
# python-version: '3.10'
# numba-version: '0.55'
# heavydb-version: dev
# docker-image: heavyai/core-os-cpu-dev:latest
# heavydb-from: docker
needs: lint
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
channel-priority: strict
channels: conda-forge
- name: Install mamba
shell: bash -l {0}
run: |
conda install mamba -c conda-forge
- name: Configure miniconda
shell: bash -l {0}
run: |
conda env config vars set MAMBA_NO_BANNER=1
# heavydb must be run in an environment that is independent of rbc environment
- name: Install heavydb v${{ matrix.heavydb-version }} [conda]
shell: bash -l {0}
if: matrix.os == 'ubuntu-latest' && matrix.heavydb-from == 'conda'
run: |
mamba create -n heavydb-env heavydb=${{ matrix.heavydb-version }}*=*_cpu -c conda-forge
- name: Build heavydb docker image and run it [docker]
shell: bash -l {0}
env:
HEAVYDB_DOCKER_IMAGE: ${{ matrix.docker-image }}
if: matrix.os == 'ubuntu-latest' && matrix.heavydb-from == 'docker'
run: |
# force docker-compose installation
mamba create -n docker docker-compose -c conda-forge
# run docker services
mamba run -n docker docker-compose build
mamba run -n docker docker-compose up -d
sleep 20
- name: heavydb-env conda list [conda]
shell: bash -l {0}
if: matrix.os == 'ubuntu-latest' && matrix.heavydb-from == 'conda'
run: |
mamba run -n heavydb-env conda list
- name: Start heavydb [conda]
shell: bash -l {0}
if: matrix.os == 'ubuntu-latest' && matrix.heavydb-from == 'conda'
run: |
mkdir storage
mamba run -n heavydb-env initheavy storage -f
mamba run -n heavydb-env heavydb --version
RUN_FLAGS="--enable-runtime-udfs --enable-table-functions --enable-dev-table-functions --enable-udf-registration-for-all-users"
echo ${RUN_FLAGS}
mamba run -n heavydb-env heavydb $RUN_FLAGS &> heavydb-output.txt &
sleep 10
- name: Create rbc test environment v${{ matrix.python-version }}
shell: bash -l {0}
run: |
cat environment.yml > rbc_test.yaml
echo " - numba=${{ matrix.numba-version }}" >> rbc_test.yaml
echo " - python=${{ matrix.python-version }}" >> rbc_test.yaml
mamba env create --file=rbc_test.yaml -n rbc
- name: rbc conda config
shell: bash -l {0}
run: |
mamba run -n rbc conda config --show
- name: rbc conda list
shell: bash -l {0}
run: |
mamba run -n rbc conda list
- name: Develop rbc
shell: bash -l {0}
run: |
mamba run -n rbc python setup.py develop
- name: Run rbc tests [docker]
shell: bash -l {0}
if: matrix.os == 'ubuntu-latest' && matrix.heavydb-from == 'docker'
env:
HEAVYDB_SOURCE: ${{ matrix.heavydb-from }}
HEAVYDB_DEV_LABEL: ${{ 'docker-dev' }}
EXPECTED_PYTHON_VERSION: ${{ matrix.python-version }}
EXPECTED_HEAVYDB_VERSION: ${{ matrix.heavydb-version }}
EXPECTED_NUMBA_VERSION: ${{ matrix.numba-version }}
RBC_TESTS_FULL: TRUE
run: |
mamba run -n rbc pytest -sv -r A rbc/tests/heavydb/ -x
- name: Run rbc tests
shell: bash -l {0}
if: ${{ ! ( matrix.os == 'ubuntu-latest' && matrix.heavydb-from == 'docker' ) }}
env:
HEAVYDB_SOURCE: ${{ matrix.heavydb-from }}
EXPECTED_PYTHON_VERSION: ${{ matrix.python-version }}
EXPECTED_HEAVYDB_VERSION: ${{ matrix.heavydb-version }}
EXPECTED_NUMBA_VERSION: ${{ matrix.numba-version }}
RBC_TESTS_FULL: TRUE
run: |
mamba run -n rbc pytest -sv -r A rbc/tests/heavydb/ -x
- name: Run doctests
shell: bash -l {0}
# requires HeavyDB 6.4 or newer
if: ${{ false }}
run: |
mamba run -n rbc pytest -sv -r A rbc/stdlib/ --doctest-modules -x
- name: Show Heavydb conda logs on failure [conda]
shell: bash -l {0}
if: failure() && matrix.os == 'ubuntu-latest' && matrix.heavydb-from == 'conda'
run: |
mamba run -n heavydb-env cat storage/mapd_log/heavydb.INFO
mamba run -n heavydb-env cat storage/mapd_log/heavydb.WARNING
mamba run -n heavydb-env cat storage/mapd_log/heavydb.ERROR
- name: Show Heavydb docker logs on failure [docker]
shell: bash -l {0}
if: failure() && matrix.os == 'ubuntu-latest' && matrix.heavydb-from == 'docker'
run: |
mamba run -n docker docker-compose top # to check if server is still alive
mamba run -n docker docker-compose exec -T ls
- name: Stop Heavydb server [conda]
shell: bash -l {0}
continue-on-error: true
if: matrix.os == 'ubuntu-latest' && matrix.heavydb-from == 'conda'
run: |
mamba run -n heavydb-env killall heavydb
sleep 5
- name: Run Non-HeavyDB tests
shell: bash -l {0}
env:
HEAVYDB_SOURCE: ${{ matrix.heavydb-from }}
EXPECTED_PYTHON_VERSION: ${{ matrix.python-version }}
EXPECTED_HEAVYDB_VERSION: ${{ matrix.heavydb-version }}
EXPECTED_NUMBA_VERSION: ${{ matrix.numba-version }}
RBC_TESTS_FULL: TRUE
run: |
mamba run -n rbc pytest -sv -r A rbc/tests/ -x --ignore rbc/tests/heavydb
- name: Show Heavydb server output [conda]
shell: bash -l {0}
if: matrix.os == 'ubuntu-latest' && matrix.heavydb-from == 'conda'
run: |
cat heavydb-output.txt
- name: Show Heavydb docker logs on failure [docker]
shell: bash -l {0}
timeout-minutes: 2
if: ${{ failure() && matrix.os == 'ubuntu-latest' && matrix.heavydb-from == 'docker' }}
run: |
mamba run -n docker docker-compose logs --no-color --tail=10000 -f -t \> heavydb-docker.log
cat heavydb-docker.log
eval-notebooks:
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.8
channel-priority: strict
channels: conda-forge
environment-file: environment.yml
- name: Install additional packages
shell: bash -l {0}
run: |
conda install mamba -c conda-forge -y
mamba install -c conda-forge heavydb=6.2*=*_cpu numba=0.56 nbval ibis-heavyai matplotlib pandas
- name: Start heavydb server
shell: bash -l {0}
run: |
mkdir storage && initheavy storage -f
heavydb --version
heavydb --enable-dev-table-functions --enable-udf-registration-for-all-users --enable-runtime-udfs --enable-table-functions 2>&1 > heavydb-output.txt &
sleep 10
- name: conda config
shell: bash -l {0}
run: conda config --show
- name: conda list
shell: bash -l {0}
run: |
conda list
- name: Install RBC
shell: bash -l {0}
continue-on-error: true
run: |
pip install -e .
- name: Execute pytest
shell: bash -l {0}
run: |
pytest -v -rs --nbval notebooks/ -x --ignore notebooks/geo
pkill -f heavydb
cat heavydb-output.txt