-
Notifications
You must be signed in to change notification settings - Fork 10
51 lines (43 loc) · 1.3 KB
/
pytest.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
name: pytest
on:
pull_request:
push:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Update Python version in environment.yml
run: |
sed -i 's/- python/- python=${{ matrix.python-version }}/g' environment.yml
echo "Updated environment.yml content:"
cat environment.yml
- name: Install Conda environment with micromamba
uses: mamba-org/setup-micromamba@v2
with:
environment-file: environment.yml
cache-environment: true
- name: Install adaptive-scheduler
shell: bash -l {0}
run: |
pip install -e ".[test,all]"
# Linux and macOS
- name: Run Python
shell: bash -l {0}
run: |
python -c "import adaptive_scheduler; print(adaptive_scheduler.__version__)"
pytest
- name: Upload coverage to Codecov
if: matrix.python-version == '3.11'
uses: codecov/codecov-action@v3