mirror of
https://github.com/PR0M3TH3AN/python_charts.git
synced 2026-10-27 08:50:39 +00:00
Add CI workflow and offline-aware startup
This commit is contained in:
1 parent
7b49366d10
commit
6cea763f73
2 files changed
+39
-1
No files matched your search
@@ -0,0 +1,34 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
|
||||||
|
- name: Cache wheelhouse
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: wheelhouse
|
||||||
|
key: wheelhouse-${{ runner.os }}-${{ hashFiles('wheelhouse/*.whl') }}
|
||||||
|
restore-keys: |
|
||||||
|
wheelhouse-${{ runner.os }}-
|
||||||
|
|
||||||
|
- name: Install pytest
|
||||||
|
run: pip install pytest
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
env:
|
||||||
|
PIP_FIND_LINKS: wheelhouse
|
||||||
|
run: |
|
||||||
|
chmod +x startup.sh
|
||||||
|
./startup.sh pytest -q
|
||||||
+5
-1
@@ -16,7 +16,11 @@ DEFAULT_MODULE="scripts.lagged_oil_unrate_chart_styled"
|
|||||||
|
|
||||||
# 1) Ensure pip & setuptools are up to date
|
# 1) Ensure pip & setuptools are up to date
|
||||||
echo "🛠 Upgrading pip & setuptools…"
|
echo "🛠 Upgrading pip & setuptools…"
|
||||||
pip install --upgrade pip setuptools
|
if [[ "${PIP_NO_INDEX:-}" == "1" ]]; then
|
||||||
|
echo "🔒 Offline mode detected; skipping upgrade"
|
||||||
|
else
|
||||||
|
pip install --upgrade pip setuptools
|
||||||
|
fi
|
||||||
|
|
||||||
# 2) Install project dependencies globally
|
# 2) Install project dependencies globally
|
||||||
echo "📦 Installing dependencies from $REQ_FILE…"
|
echo "📦 Installing dependencies from $REQ_FILE…"
|
||||||
|
|||||||
Reference in new issue
Block a user