ci #200
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
# https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow | |
# https://github.com/jiro4989/setup-nim-action | |
name: ci | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
schedule: | |
- cron: '0 0 * * 0' # at 00:00 every Sunday | |
jobs: | |
python: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python_version: ["3.8", "3.10"] | |
install_type: [standard, dev, minimal] | |
exclude: | |
# It looks like pip installing our minimal pandas version is very slow under Python 3.10, | |
# most likely, because it involves explicit compilation. Excluding it for now because | |
# testing old library versions against a modern Python is a rather rare use case. | |
- python_version: "3.10" | |
install_type: minimal | |
env: | |
INSTALL_TYPE: ${{ matrix.install_type }} | |
name: "Python ${{ matrix.python_version }}, ${{ matrix.install_type }}" | |
steps: | |
- uses: actions/checkout@master | |
- name: Set up Python ${{ matrix.python_version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python_version }} | |
- name: Install tabloo + dependencies | |
run: | | |
set -e | |
echo -e "\n *** Inspecting base environment" | |
pip freeze | |
echo -e "\n *** Updating pip + setuptools" | |
pip install -U pip setuptools | |
pip config list | |
cd src_backend_python | |
echo -e "\n *** Installing tabloo" | |
if [[ $INSTALL_TYPE = "standard" ]]; then | |
pip install wheel | |
python setup.py sdist bdist_wheel | |
ls -la ./dist/*.whl | |
pip install ./dist/*.whl | |
elif [[ $INSTALL_TYPE = "dev" ]]; then | |
pip install -I -e . | |
elif [[ $INSTALL_TYPE = "minimal" ]]; then | |
pip install -I -e . | |
# Apparently earlier versions of pandas behave differently in term of to_dict(). | |
# Need to check if we could support them as well by rolling our own to_dict() logic. | |
pip install flask==2.0.0 pandas==1.2.0 | |
fi | |
echo -e "\n *** Installing test dependencies" | |
pip install -U pytest pytest-cov | |
echo -e "\n *** Installed packages:" | |
pip freeze | |
- name: Test | |
run: cd src_backend_python && py.test --color=yes | |
- name: CLI Test | |
run: tabloo_cli -h | |
frontend: | |
runs-on: ubuntu-latest | |
name: Frontend | |
steps: | |
- uses: actions/checkout@master | |
- name: Install node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 14.x | |
- run: npm install | |
- run: npm run check-types | |
- run: npm run lint | |
- run: npm run fmt-check |