Skip to content

Commit 307ef07

Browse files
committed
test w/gitstrap
1 parent f133fed commit 307ef07

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: GSAS-II self-tests on Windows via gitstrap
2+
3+
on:
4+
# Runs on pushes targeting the default branch
5+
push:
6+
branches-ignore:
7+
- master
8+
# branches: ['main']
9+
pull_request:
10+
branches: ['main']
11+
12+
workflow_dispatch: # Allows running this workflow manually
13+
14+
jobs:
15+
test-GSAS-II:
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
python-version: ["3.11", "3.12", "3.13"]
20+
# python-version: ["3.13"]
21+
runs-on: 'windows-latest'
22+
steps:
23+
- uses: conda-incubator/setup-miniconda@v3
24+
with:
25+
auto-update-conda: true
26+
python-version: ${{ matrix.python-version }}
27+
- name: Conda install
28+
shell: bash -el {0}
29+
run: |
30+
# tailor the numpy version to match the GSAS-II binaries
31+
if [ "${{ matrix.python-version }}" == "3.13" ]; then
32+
npver=2.2
33+
elif [ "${{ matrix.python-version }}" == "3.12" ]; then
34+
npver=2.2
35+
elif [ "${{ matrix.python-version }}" == "3.11" ]; then
36+
npver=1.26
37+
fi
38+
conda install python-gil python=${{ matrix.python-version }} numpy=${npver} scipy requests pytest git gitpython -c conda-forge --override-channels --quiet
39+
#conda info
40+
#conda list
41+
- name: GSAS-II install
42+
shell: bash -el {0}
43+
run: |
44+
curl -L -O https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/raw/main/install/gitstrap.py
45+
python gitstrap.py --nocheck --noshortcut --branch=main
46+
47+
# - name: GSAS-II single test
48+
# shell: bash -el {0}
49+
# run: |
50+
# cd GSAS-II
51+
# python tests/test_elm.py
52+
# python tests/test_spg.py
53+
54+
- name: GSAS-II all tests
55+
shell: bash -el {0}
56+
run: |
57+
cd GSAS-II
58+
python -m pytest

0 commit comments

Comments
 (0)