Add hyperparam opt #32
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: build_test_macos | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build_test_macos: | |
name: ${{ matrix.python-version }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["macos-12"] | |
python-version: ["3.11", | |
"3.10" | |
] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Setup py-${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# Caching improves build time, we use pythonLocation to cache everything including wheels to avoid building | |
# wheels at each build (pandas/Pypy is extremely time consuming) | |
# sed replacement is performed to rectify PyPy path which ends with /bin | |
# cache key takes into account the Python version of the runner to avoid version mismatch on updates. | |
- name: Get pip cache path | |
id: get-pip-path | |
run: | | |
id=$(echo ${{ env.pythonLocation }} | sed 's/\/bin//g') | |
echo "::set-output name=id::$id" | |
- name: Pip cache | |
uses: actions/cache@v3 | |
id: pip-cache | |
with: | |
path: ${{ steps.get-pip-path.outputs.id }} | |
key: ${{ steps.get-pip-path.outputs.id }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements.txt') }} | |
- name: Install requirements | |
if: steps.pip-cache.outputs.cache-hit != 'true' | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r requirements.txt | |
- name: Build | |
run: | | |
python -m pip install . | |
- name: Test | |
# On other versions then 3.9, we test only. (without coverage generation) | |
if: startsWith(matrix.os, 'macos') && !startsWith(matrix.python-version, '3.9') && !startsWith(github.ref, 'refs/tags/') | |
run: | | |
python -m pytest tests.py |