Skip to content

Commit 2eefc7f

Browse files
Update config.yml
1 parent 1187648 commit 2eefc7f

1 file changed

Lines changed: 42 additions & 10 deletions

File tree

.circleci/config.yml

Lines changed: 42 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,74 @@
1-
version: 2
1+
version: 2 # keep 2.0 syntax; CircleCI 2.1 also works
2+
23
jobs:
34
emulator-build-test:
45
docker:
5-
- image: circleci/python:3.7
6+
- image: circleci/python:3.7 # upgrade to cimg/python:3.12 if you like
67
steps:
7-
- checkout:
8-
path: .pykk
8+
# ────────────────────────────────────────────────────────────────
9+
# 1) Pull python-keepkey via HTTPS so no SSH key is required
10+
# ────────────────────────────────────────────────────────────────
11+
- run:
12+
name: Clone python-keepkey
13+
command: git clone --depth 1 https://github.com/keepkey/python-keepkey.git .pykk
14+
15+
# ────────────────────────────────────────────────────────────────
16+
# 2) Grab firmware repo and inject our fresh python-keepkey copy
17+
# ────────────────────────────────────────────────────────────────
918
- run:
10-
name: Checkout Firmware & Inject python-keepkey
19+
name: Checkout firmware & inject python-keepkey
1120
command: |
21+
# Ensure all submodule URLs fall back to HTTPS
1222
git config --global url."https://github.com/".insteadOf git@github.com:
1323
git config --global url."https://".insteadOf git://
24+
25+
# Move python-keepkey out of the way for the moment
1426
mv .pykk ../
15-
git clone $FIRMWARE_REPO --depth 1 -b master .
27+
28+
# Clone firmware repository (expects $FIRMWARE_REPO env var)
29+
git clone --depth 1 -b master "$FIRMWARE_REPO" .
30+
31+
# Initialise firmware submodules
1632
git submodule update --init --recursive
33+
34+
# Replace the vendor copy with our freshly–cloned python-keepkey
1735
rm -rf deps/python-keepkey
1836
mv ../.pykk deps/python-keepkey
37+
38+
# Pull python-keepkey submodules too
1939
cd deps/python-keepkey
2040
git submodule update --init --recursive
41+
cd ../../..
42+
43+
# ────────────────────────────────────────────────────────────────
44+
# 3) Build the Docker-based emulator tests
45+
# ────────────────────────────────────────────────────────────────
2146
- setup_remote_docker
47+
2248
- run:
23-
name: Emulator Tests
49+
name: Emulator tests
2450
command: |
2551
pushd ./scripts/emulator
26-
set +e
52+
set +e # don’t exit on first failure
2753
docker-compose up --build firmware-unit
2854
docker-compose up --build python-keepkey
2955
set -e
56+
57+
# Collect JUnit / pytest XML results
3058
mkdir -p ../../test-reports
3159
docker cp "$(docker-compose ps -q firmware-unit)":/kkemu/test-reports/. ../../test-reports/
3260
docker cp "$(docker-compose ps -q python-keepkey)":/kkemu/test-reports/. ../../test-reports/
3361
popd
34-
[ "$(cat test-reports/python-keepkey/status)$(cat test-reports/firmware-unit/status)" == "00" ] || exit 1
62+
63+
# Fail job if either container reported non-zero status
64+
[ "$(cat test-reports/python-keepkey/status)$(cat test-reports/firmware-unit/status)" = "00" ] || exit 1
65+
3566
- store_test_results:
3667
path: test-reports
68+
69+
# ──────────────────────────────────────────────────────────────────────
3770
workflows:
3871
version: 2
3972
emulator:
4073
jobs:
4174
- emulator-build-test
42-

0 commit comments

Comments
 (0)