-
Notifications
You must be signed in to change notification settings - Fork 50
75 lines (66 loc) · 2 KB
/
run_tests.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Run Unit Tests
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
# trigger on pull requests
pull_request:
# trigger on all commits to trunk branches
push:
branches:
- "main"
- "next"
# trigger on request
workflow_dispatch:
jobs:
run_tests:
name: Run tests on ${{ matrix.os }} with Python ${{ matrix.python }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python: ['3.8', '3.9', '3.10', '3.11', '3.12']
include:
# Default to newest dependencies
- env: 'test_env.yaml'
# Test the oldest Python with the oldest supported dependencies.
- python: '3.8'
env: 'test-oldest_env.yaml'
- python: '3.9'
env: 'test-compatible_env.yaml'
# Test macOS and windows on oldest and latest versions.
- os: 'macos-14'
python: '3.12'
env: 'test_env.yaml'
- os: 'windows-latest'
python: '3.12'
env: 'test_env.yaml'
- os: 'windows-latest'
python: '3.8'
env: 'test-oldest_env.yaml'
- os: 'macos-14'
python: '3.8'
env: 'test-oldest_env.yaml'
steps:
- name: Checkout Code
uses: actions/[email protected]
with:
submodules: true
- name: Create Python Environment
uses: conda-incubator/[email protected]
with:
python-version: ${{ matrix.python }}
environment-file: .github/workflows/env-files/${{ matrix.env }}
channels: conda-forge
activate-environment: test
show-channel-urls: true
miniforge-variant: Mambaforge
use-mamba: true
- name: Build and Install freud
shell: bash -l {0}
run: |
pip install . --ignore-installed --no-build-isolation --no-deps
- name: Run Tests
shell: bash -l {0}
run: |
pytest tests/ -v