Skip to content
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
81 changes: 7 additions & 74 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,79 +2,12 @@ name: Tests

on: [push, pull_request]

# Unit tests are defined once, centrally, in PyAutoHeart's reusable workflow
# (Heart owns all health/readiness checking). This thin caller preserves PR-time
# gating: the `unittest` job is the required status check on this repo.
jobs:
unittest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, '3.10', '3.11', '3.12']
steps:
- name: Checkout PyAutoConf
uses: actions/checkout@v2
with:
repository: rhayes777/PyAutoConf
path: PyAutoConf
- name: Checkout PyAutoFit
uses: actions/checkout@v2
with:
repository: rhayes777/PyAutoFit
path: PyAutoFit
- name: Checkout PyAutoArray
uses: actions/checkout@v2
with:
repository: Jammy2211/PyAutoArray
path: PyAutoArray
- name: Checkout PyAutoCTI
uses: actions/checkout@v2
with:
repository: Jammy2211/PyAutoCTI
path: PyAutoCTI
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Extract branch name
shell: bash
run: |
cd PyAutoCTI
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Change to same branch if exists in deps
shell: bash
run: |
export PACKAGES=("PyAutoConf" "PyAutoArray" "PyAutoFit")
export BRANCH="${{ steps.extract_branch.outputs.branch }}"
for PACKAGE in ${PACKAGES[@]}; do
pushd $PACKAGE
export existed_in_remote=$(git ls-remote --heads origin ${BRANCH})

if [[ -z ${existed_in_remote} ]]; then
echo "Branch $BRANCH did not exist in $PACKAGE"
else
echo "Branch $BRANCH did exist in $PACKAGE"
git fetch
git checkout $BRANCH
fi
popd
done
- name: Install dependencies
run: |
pip3 install --upgrade pip
pip3 install setuptools
pip3 install wheel
pip3 install pytest coverage pytest-cov
pip3 install -r PyAutoConf/requirements.txt
pip3 install -r PyAutoFit/requirements.txt
pip3 install -r PyAutoArray/requirements.txt
pip3 install -r PyAutoArray/optional_requirements.txt
pip3 install -r PyAutoCTI/requirements.txt
pip3 install -r PyAutoCTI/optional_requirements.txt
- name: Run tests
run: |
export ROOT_DIR=`pwd`
export PYTHONPATH=$PYTHONPATH:$ROOT_DIR/PyAutoConf
export PYTHONPATH=$PYTHONPATH:$ROOT_DIR/PyAutoFit
export PYTHONPATH=$PYTHONPATH:$ROOT_DIR/PyAutoArray
export PYTHONPATH=$PYTHONPATH:$ROOT_DIR/PyAutoCTI
pushd PyAutoCTI
pytest --cov autocti --cov-report xml:coverage.xml
uses: PyAutoLabs/PyAutoHeart/.github/workflows/lib-tests.yml@main
with:
package: autocti
secrets: inherit
25 changes: 25 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.12"
apt_packages:
- libgsl-dev
jobs:
post_install:
# arcticpy is a source-only C++ sdist whose own requirements downgrade
# numpy below 2.0 — install numpy first, then build without deps.
- pip install numpy
- pip install arcticpy==2.6 --no-build-isolation --no-deps

python:
install:
- method: pip
path: .
extra_requirements:
- docs

sphinx:
configuration: docs/conf.py
fail_on_warning: false
15 changes: 0 additions & 15 deletions readthedocs.yaml

This file was deleted.

Loading