This repository was archived by the owner on Dec 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
54 lines (44 loc) · 1.37 KB
/
Copy pathtest.yml
File metadata and controls
54 lines (44 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
PYTHONUNBUFFERED: 1
PYTEST_ADDOPTS: "--color=yes"
jobs:
conda-install:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ['3.9', '3.10']
defaults:
run:
# https://github.com/conda-incubator/setup-miniconda/tree/v2#use-a-default-shell
shell: bash -l {0}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Miniconda with Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniconda-version: "latest"
python-version: ${{ matrix.python-version }}
activate-environment: test_env
- name: Install other dependencies
run: |
conda install -c conda-forge -y boost-cpp eigen range-v3
python -m pip install --upgrade pip
- name: Install CPU PyTorch (only for Linux)
if: matrix.os == 'ubuntu-latest'
run: pip install torch --extra-index-url https://download.pytorch.org/whl/cpu
- name: Install Bean Machine in editable mode
run: pip install -v -e .[dev]
- name: Print out package info to help with debug
run: pip list
- name: Run unit tests with pytest
run: pytest