-
Notifications
You must be signed in to change notification settings - Fork 21
56 lines (54 loc) · 2.42 KB
/
testing.yml
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
55
56
name: testing
on:
pull_request:
branches: [master, develop]
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python: [3.12]
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- name: Checkout source repository
uses: actions/checkout@v2
with:
fetch-depth: 0
clean: false
- name: Checkout to current branch
run: git checkout ${{ env.BRANCH }}
- name: Install non-python dependencies on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update -y
sudo apt-get install libbluetooth-dev -y
- name: Set up Miniconda for Linux and Windows with ${{ matrix.python }}
if: matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest'
uses: s-weigand/setup-conda@v1
with:
python-version: ${{ matrix.python }}
conda-channels: anaconda, conda-forge
- name: Set up Miniconda for macOS with ${{ matrix.python }}
if: matrix.os == 'macos-latest'
shell: bash
run: |
mkdir -p ${{ github.workspace }}/miniconda3
curl "https://repo.anaconda.com/miniconda/Miniconda3-py312_24.9.2-0-MacOSX-arm64.sh" -o "${{ github.workspace }}/miniconda3/miniconda.sh"
bash ${{ github.workspace }}/miniconda3/miniconda.sh -b -u -p ${{ github.workspace }}/miniconda3
rm ${{ github.workspace }}/miniconda3/miniconda.sh
source ${{ github.workspace }}/miniconda3/bin/activate
conda init bash
conda config --prepend channels conda-forge
echo "${{ github.workspace }}/miniconda3/bin/" >> $GITHUB_PATH
- name: Install liblsl from conda-forge
run: |
conda install -c conda-forge liblsl
pip install -e .[test]
python -m pytest --import-mode=append --html=pytest_report.html --self-contained-html
- name: Archive test results
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: pytest-results-${{ matrix.runs-on }}
path: pytest_report.html