Skip to content

Commit f4c6441

Browse files
committed
Add build_and_test_pip github action
1 parent b50e4a1 commit f4c6441

File tree

1 file changed

+45
-1
lines changed

1 file changed

+45
-1
lines changed

.github/workflows/build.yaml

Lines changed: 45 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,47 @@ 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+
python-version: ${{ matrix.python-version }}
74+
channels: conda-forge,defaults
75+
channel-priority: strict
76+
show-channel-urls: true
77+
78+
- name: Update pip/wheel infrastructure
79+
shell: bash -l {0}
80+
run: |
81+
conda install -y -q "pip<22" wheel
82+
83+
- name: Install dependencies
84+
shell: bash -l {0}
85+
run: |
86+
pip install -r requirements.txt
87+
88+
# We have two cores so we can speed up the testing with xdist
89+
- name: Install pytest packages
90+
shell: bash -l {0}
91+
run: |
92+
conda install -y -q \
93+
pytest pytest-xdist pytest-openfiles
94+
95+
- name: Build and install
96+
run: |
97+
python -m pip install --no-deps -v -e .
98+
99+
- name: Run tests
100+
run: |
101+
pytest -r a -v -n 3 --open-files

0 commit comments

Comments
 (0)