Refactor chunking #124
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
name: CI | |
on: | |
push: | |
branches: | |
- master | |
- main | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
base-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- 3.8 | |
action: | |
- TEST=test_Config | |
- TEST=test_Dataset | |
- TEST=test_GeneratingDataset | |
- TEST=test_hdf_dump | |
- TEST=test_HDFDataset | |
- TEST=test_LearningRateControl | |
- TEST=test_SprintDataset | |
- TEST=test_TranslationDataset | |
- TEST=test_Util | |
- TEST=pytorch/test_engine | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cache | |
~/.local | |
key: cache-${{ runner.os }}-py${{ matrix.python-version }}-no-tf | |
restore-keys: | | |
cache-${{ runner.os }}-py${{ matrix.python-version }}- | |
- name: Setup dependencies | |
run: | | |
echo "PATH=$PATH:~/.local/bin" >> $GITHUB_ENV | |
echo "Python ${{matrix.python-version}}" | |
echo "pip: $(type pip)" | |
pip install --user --upgrade pip setuptools wheel | |
pip install --user pytest | |
# Install nose anyway because we currently use some of its helper functions. | |
pip install --user nose | |
pip install --user -r requirements.txt | cat | |
- name: Test Python/Numpy/TF versions. | |
run: | | |
echo "Python env: $(type python) $(python --version)" | |
python -c "import numpy; print('NumPy:', numpy.version.full_version)" | |
echo "Pytest env:" | |
python -m pytest -V | |
- name: Run test | |
run: | | |
export ${{ matrix.action }} | |
python -m pytest tests/$TEST.py |