Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pip install in GitHub CI to support Gooey for Python 3.13 conda env #134

Merged
merged 4 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 48 additions & 8 deletions .github/workflows/matrix-and-codecov-on-merge-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,51 @@ on:
workflow_dispatch:

jobs:
matrix-coverage:
uses: Billingegroup/release-scripts/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml@v0
with:
project: diffpy.labpdfproc
c_extension: false
headless: false
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
coverage:
defaults:
run:
shell: bash -l {0}

runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
python-version: ["3.11", "3.12", "3.13"]
env:
LATEST_PYTHON_VERSION: "3.13"
steps:
- name: Check out diffpy.labpdfproc
uses: actions/checkout@v4

- name: Initialize miniconda
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test
auto-update-conda: true
environment-file: environment.yml
auto-activate-base: false
python-version: ${{ matrix.python-version }}

- name: Conda config
run: >-
conda config --set always_yes yes
--set changeps1 no

- name: Install diffpy.labpdfproc and requirements
run: |
conda install --file requirements/test.txt
pip install -r requirements/pip.txt
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pip install under pip.txt

python -m pip install . --no-deps

- name: Validate diffpy.labpdfproc
run: |
pytest --cov
coverage report -m
codecov

- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.python-version == env.LATEST_PYTHON_VERSION
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
51 changes: 43 additions & 8 deletions .github/workflows/tests-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,46 @@ on:
workflow_dispatch:

jobs:
tests-on-pr:
uses: Billingegroup/release-scripts/.github/workflows/_tests-on-pr.yml@v0
with:
project: diffpy.labpdfproc
c_extension: false
headless: false
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
validate:
defaults:
run:
shell: bash -l {0}

runs-on: ubuntu-latest
steps:
- name: Check out diffpy.labpdfproc repository
uses: actions/checkout@v4

- name: Initialize miniconda
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test
auto-update-conda: true
environment-file: environment.yml
auto-activate-base: false
python-version: 3.13

- name: Conda config
run: >-
conda config --set always_yes yes
--set changeps1 no

- name: Install diffpy.labpdfproc and requirements
run: |
conda install --file requirements/test.txt
pip install -r requirements/pip.txt
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pip install under pip.txt

python -m pip install . --no-deps


- name: Validate diffpy.labpdfproc
run: |
pytest --cov
coverage report -m
codecov

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
verbose: true
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
Loading