Skip to content

Commit

Permalink
Add build_and_test_pip github action
Browse files Browse the repository at this point in the history
  • Loading branch information
taranu committed May 1, 2024
1 parent ccfb5f7 commit a80e327
Showing 1 changed file with 45 additions and 1 deletion.
46 changes: 45 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
pull_request:

jobs:
build_and_test:
build_and_test_conda:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
Expand Down Expand Up @@ -55,3 +55,47 @@ jobs:
uses: codecov/codecov-action@v2
with:
file: tests/.tests/pytest-sconsUtils.xml-cov-sconsUtils.xml
build_and_test_pip:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
pyversion: ["3.10", "3.11", "3.12"]

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
# Need to clone everything for the git tags.
fetch-depth: 0

- uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
channels: conda-forge,defaults
channel-priority: strict
show-channel-urls: true

- name: Update pip/wheel infrastructure
shell: bash -l {0}
run: |
conda install -y -q "pip<22" wheel
- name: Install dependencies
shell: bash -l {0}
run: |
pip install -r requirements.txt
# We have two cores so we can speed up the testing with xdist
- name: Install pytest packages
shell: bash -l {0}
run: |
conda install -y -q \
pytest pytest-xdist pytest-openfiles
- name: Build and install
run: |
python -m pip install --no-deps -v -e .
- name: Run tests
run: |
pytest -r a -v -n 3 --open-files

0 comments on commit a80e327

Please sign in to comment.