Skip to content

don't compute correction if no pinhole. #1770

don't compute correction if no pinhole.

don't compute correction if no pinhole. #1770

Workflow file for this run

name: test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
pytest:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: true
matrix:
python-version: [3.11]
config:
- {
name: "Linux",
os: ubuntu-latest
}
- {
name: "MacOSX",
os: macos-latest
}
- {
name: "Windows",
os: windows-latest
}
defaults:
run:
shell: bash
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Checkout HEXRD
uses: actions/checkout@v4
with:
path: hexrd
- name: Checkout examples
uses: actions/checkout@v4
with:
repository: HEXRD/examples
path: examples
# post hexrd/hexrd#454 ref reverts to default branch
# !!! leaving this here in case we pin to a specific examples release
# ref:
- name: Set environment variable to work around setuptools/numpy issue
run: echo 'SETUPTOOLS_USE_DISTUTILS=stdlib' >> $GITHUB_ENV
if: ${{ matrix.config.os == 'windows-latest'}}
- name: Install HEXRD
# Install in editable mode for codecov
run: |
pip install -e .
working-directory: hexrd
- name: Install requirements-dev.txt
run: |
pip install -r tests/requirements-dev.txt
working-directory: hexrd
- name: Run tests
env:
HEXRD_EXAMPLE_REPO_PATH: ${{ github.workspace }}/examples
run: |
pytest -s tests/
if: ${{ matrix.config.os != 'ubuntu-latest'}}
working-directory: hexrd
- name: Run tests with codecov
env:
HEXRD_EXAMPLE_REPO_PATH: ${{ github.workspace }}/examples
run: |
pytest -s --cov hexrd --cov-report xml:coverage.xml tests/
if: ${{ matrix.config.os == 'ubuntu-latest'}}
working-directory: hexrd
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
working-directory: hexrd
if: ${{ matrix.config.os == 'ubuntu-latest'}}