Skip to content

Commit fcf6619

Browse files
authored
Merge pull request #89 from PyAutoLabs/feature/cti-resurrection-phase3
CTI resurrection Phase 3: modern CI caller + readthedocs config
2 parents 12a3eca + 90213f3 commit fcf6619

3 files changed

Lines changed: 32 additions & 89 deletions

File tree

.github/workflows/main.yml

Lines changed: 7 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -2,79 +2,12 @@ name: Tests
22

33
on: [push, pull_request]
44

5+
# Unit tests are defined once, centrally, in PyAutoHeart's reusable workflow
6+
# (Heart owns all health/readiness checking). This thin caller preserves PR-time
7+
# gating: the `unittest` job is the required status check on this repo.
58
jobs:
69
unittest:
7-
runs-on: ubuntu-latest
8-
strategy:
9-
matrix:
10-
python-version: [3.9, '3.10', '3.11', '3.12']
11-
steps:
12-
- name: Checkout PyAutoConf
13-
uses: actions/checkout@v2
14-
with:
15-
repository: rhayes777/PyAutoConf
16-
path: PyAutoConf
17-
- name: Checkout PyAutoFit
18-
uses: actions/checkout@v2
19-
with:
20-
repository: rhayes777/PyAutoFit
21-
path: PyAutoFit
22-
- name: Checkout PyAutoArray
23-
uses: actions/checkout@v2
24-
with:
25-
repository: Jammy2211/PyAutoArray
26-
path: PyAutoArray
27-
- name: Checkout PyAutoCTI
28-
uses: actions/checkout@v2
29-
with:
30-
repository: Jammy2211/PyAutoCTI
31-
path: PyAutoCTI
32-
- name: Set up Python ${{ matrix.python-version }}
33-
uses: actions/setup-python@v2
34-
with:
35-
python-version: ${{ matrix.python-version }}
36-
- name: Extract branch name
37-
shell: bash
38-
run: |
39-
cd PyAutoCTI
40-
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
41-
id: extract_branch
42-
- name: Change to same branch if exists in deps
43-
shell: bash
44-
run: |
45-
export PACKAGES=("PyAutoConf" "PyAutoArray" "PyAutoFit")
46-
export BRANCH="${{ steps.extract_branch.outputs.branch }}"
47-
for PACKAGE in ${PACKAGES[@]}; do
48-
pushd $PACKAGE
49-
export existed_in_remote=$(git ls-remote --heads origin ${BRANCH})
50-
51-
if [[ -z ${existed_in_remote} ]]; then
52-
echo "Branch $BRANCH did not exist in $PACKAGE"
53-
else
54-
echo "Branch $BRANCH did exist in $PACKAGE"
55-
git fetch
56-
git checkout $BRANCH
57-
fi
58-
popd
59-
done
60-
- name: Install dependencies
61-
run: |
62-
pip3 install --upgrade pip
63-
pip3 install setuptools
64-
pip3 install wheel
65-
pip3 install pytest coverage pytest-cov
66-
pip3 install -r PyAutoConf/requirements.txt
67-
pip3 install -r PyAutoFit/requirements.txt
68-
pip3 install -r PyAutoArray/requirements.txt
69-
pip3 install -r PyAutoArray/optional_requirements.txt
70-
pip3 install -r PyAutoCTI/requirements.txt
71-
pip3 install -r PyAutoCTI/optional_requirements.txt
72-
- name: Run tests
73-
run: |
74-
export ROOT_DIR=`pwd`
75-
export PYTHONPATH=$PYTHONPATH:$ROOT_DIR/PyAutoConf
76-
export PYTHONPATH=$PYTHONPATH:$ROOT_DIR/PyAutoFit
77-
export PYTHONPATH=$PYTHONPATH:$ROOT_DIR/PyAutoArray
78-
export PYTHONPATH=$PYTHONPATH:$ROOT_DIR/PyAutoCTI
79-
pushd PyAutoCTI
80-
pytest --cov autocti --cov-report xml:coverage.xml
10+
uses: PyAutoLabs/PyAutoHeart/.github/workflows/lib-tests.yml@main
11+
with:
12+
package: autocti
13+
secrets: inherit

.readthedocs.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
version: 2
2+
3+
build:
4+
os: ubuntu-22.04
5+
tools:
6+
python: "3.12"
7+
apt_packages:
8+
- libgsl-dev
9+
jobs:
10+
post_install:
11+
# arcticpy is a source-only C++ sdist whose own requirements downgrade
12+
# numpy below 2.0 — install numpy first, then build without deps.
13+
- pip install numpy
14+
- pip install arcticpy==2.6 --no-build-isolation --no-deps
15+
16+
python:
17+
install:
18+
- method: pip
19+
path: .
20+
extra_requirements:
21+
- docs
22+
23+
sphinx:
24+
configuration: docs/conf.py
25+
fail_on_warning: false

readthedocs.yaml

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)