Skip to content

pip install tester

pip install tester #5

name: pip install tester
on:
# Uncomment these lines for testing
# push:
# branches: [ develop ]
# pull_request:
# branches: [ develop, releases/** ]
# Uncomment these lines for production
schedule:
- cron: '0 0 1 JAN,MAY,AUG,NOV *'
jobs:
pip_test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# TODO: change ubuntu-20.04 back to ubuntu-latest when the following issue is resolved:
# https://github.com/actions/setup-python/issues/162
os: [ubuntu-20.04]
python-version: [3.6, 3.7, 3.8, 3.9]
hatchet-version: ["2022.2.0"]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ format('v{0}', matrix.hatchet-version) }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build unit test dependencies
run: |
python -m pip install --upgrade pip pytest
- name: Build Python 3 dependencies
run: |
python -m pip install tables
- name: Install Hatchet
env:
HATCHET_VERSION: ${{ matrix.hatchet-version }}
run: |
curr_dir=$(pwd)
cd ~
python -m pip install llnl-hatchet==$HATCHET_VERSION
cd $curr_dir
- name: Show packages
run: |
python -m pip list
- name: Prep tests
env:
HATCHET_VERSION: ${{ matrix.hatchet-version }}
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
cp -r ./hatchet/tests ~
test_dir="tests-$HATCHET_VERSION-$PYTHON_VERSION"
mv ~/tests ~/$test_dir
cat > ~/$test_dir/pytest.ini << EOF
[pytest]
addopts = --durations=20 -ra
testpaths = .
python_files = *.py
EOF
- name: Test Hatchet
env:
HATCHET_VERSION: ${{ matrix.hatchet-version }}
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
curr_dir=$(pwd)
cd ~
test_dir="tests-$HATCHET_VERSION-$PYTHON_VERSION"
pytest -vv $test_dir
cd $curr_dir