Skip to content

Commit 8b00314

Browse files
committed
Add build_and_test_pip github action
1 parent 68fc3b1 commit 8b00314

File tree

1 file changed

+42
-1
lines changed

1 file changed

+42
-1
lines changed

.github/workflows/build.yaml

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
pull_request:
88

99
jobs:
10-
build_and_test:
10+
build_and_test_conda:
1111
strategy:
1212
matrix:
1313
os: [ubuntu-latest, macos-latest]
@@ -55,3 +55,44 @@ jobs:
5555
uses: codecov/codecov-action@v2
5656
with:
5757
file: tests/.tests/pytest-sconsUtils.xml-cov-sconsUtils.xml
58+
build_and_test_pip:
59+
strategy:
60+
matrix:
61+
os: [ubuntu-latest, macos-latest]
62+
pyversion: ["3.10", "3.11", "3.12"]
63+
64+
runs-on: ${{ matrix.os }}
65+
steps:
66+
- uses: actions/checkout@v3
67+
with:
68+
# Need to clone everything for the git tags.
69+
fetch-depth: 0
70+
71+
- uses: conda-incubator/setup-miniconda@v2
72+
with:
73+
auto-update-conda: true
74+
channels: conda-forge,defaults
75+
miniforge-variant: Mambaforge
76+
use-mamba: true
77+
channel-priority: strict
78+
show-channel-urls: true
79+
80+
- name: Install dependencies
81+
shell: bash -l {0}
82+
run: |
83+
pip install -r requirements.txt
84+
85+
# We have two cores so we can speed up the testing with xdist
86+
- name: Install pytest packages
87+
shell: bash -l {0}
88+
run: |
89+
mamba install -y -q \
90+
pytest pytest-xdist pytest-openfiles
91+
92+
- name: Build and install
93+
run: |
94+
python -m pip install --no-deps -v -e .
95+
96+
- name: Run tests
97+
run: |
98+
pytest -r a -v -n 3 --open-files

0 commit comments

Comments
 (0)