-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (93 loc) · 3.03 KB
/
smoke_tests.yml
File metadata and controls
95 lines (93 loc) · 3.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Smoke Tests
on: [push, pull_request]
jobs:
smoke:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.12', '3.13']
steps:
- name: Checkout PyAutoConf
uses: actions/checkout@v4
with:
repository: PyAutoLabs/PyAutoConf
path: PyAutoConf
- name: Checkout PyAutoFit
uses: actions/checkout@v4
with:
repository: PyAutoLabs/PyAutoFit
path: PyAutoFit
- name: Checkout PyAutoArray
uses: actions/checkout@v4
with:
repository: PyAutoLabs/PyAutoArray
path: PyAutoArray
- name: Checkout PyAutoGalaxy
uses: actions/checkout@v4
with:
repository: PyAutoLabs/PyAutoGalaxy
path: PyAutoGalaxy
- name: Checkout HowToGalaxy
uses: actions/checkout@v4
with:
path: workspace
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Extract branch name
id: extract_branch
shell: bash
run: |
cd workspace
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> "$GITHUB_OUTPUT"
- name: Match library branches
shell: bash
run: |
BRANCH="${{ steps.extract_branch.outputs.branch }}"
for PKG in PyAutoConf PyAutoFit PyAutoArray PyAutoGalaxy; do
pushd "$PKG"
if [[ -n "$(git ls-remote --heads origin "$BRANCH")" ]]; then
echo "Branch $BRANCH exists in $PKG — checking out"
git fetch origin "$BRANCH"
git checkout "$BRANCH"
else
echo "Branch $BRANCH not in $PKG — staying on main"
fi
popd
done
- name: Install dependencies
run: |
pip install --upgrade pip setuptools wheel
pip install pyyaml
if [ "${{ matrix.python-version }}" = "3.12" ]; then
pip install ./PyAutoConf ./PyAutoFit ./PyAutoArray ./PyAutoGalaxy
pip install "./PyAutoArray[optional]" "./PyAutoGalaxy[optional]"
else
pip install ./PyAutoConf ./PyAutoFit ./PyAutoArray ./PyAutoGalaxy
pip install numba
fi
pip install tensorflow-probability==0.25.0
- name: Prepare cache dirs
run: |
mkdir -p /tmp/numba_cache /tmp/matplotlib
- name: Run smoke tests
env:
JAX_ENABLE_X64: "True"
NUMBA_CACHE_DIR: /tmp/numba_cache
MPLCONFIGDIR: /tmp/matplotlib
run: |
cd workspace
python .github/scripts/run_smoke.py
- name: Slack notify on failure
if: ${{ failure() }}
uses: slackapi/[email protected]
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
with:
channel-id: C03S98FEDK2
payload: |
{
"text": "${{ github.repository }}/${{ github.ref_name }} smoke tests (Python ${{ matrix.python-version }}) ${{ job.status }}\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}