Skip to content

Commit 9f457c4

Browse files
committed
Ensure pure cbor2 in CI
1 parent 81961ac commit 9f457c4

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ jobs:
2828
- name: Install dependencies
2929
run: |
3030
poetry install
31+
- name: Ensure pure cbor2 is installed
32+
run: |
33+
make ensure-pure-cbor2
3134
- name: Run unit tests
3235
run: |
3336
poetry run pytest --doctest-modules --ignore=examples --cov=pycardano --cov-config=.coveragerc --cov-report=xml

.github/workflows/publish.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ jobs:
2424
- name: Install dependencies
2525
run: |
2626
poetry install
27+
- name: Ensure pure cbor2 is installed
28+
run: |
29+
make ensure-pure-cbor2
2730
- name: Lint with flake8
2831
run: |
2932
poetry run flake8 pycardano

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ ensure-pure-cbor2: ## ensures cbor2 is installed with pure Python implementation
3434
print(f'Using C extension: {using_c_ext}'); \
3535
exit(1 if using_c_ext else 0)" || \
3636
(echo "Reinstalling cbor2 with pure Python implementation..." && \
37-
poetry run pip install --no-binary cbor2 "cbor2==$$(cat .cbor2_version)" --force-reinstall && \
37+
poetry run pip uninstall -y cbor2 && \
38+
CBOR2_BUILD_C_EXTENSION=0 poetry run pip install --no-binary cbor2 "cbor2==$$(cat .cbor2_version)" --force-reinstall && \
3839
rm .cbor2_version)
3940

4041
help:

integration-test/run_tests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ set -o pipefail
66
ROOT=$(pwd)
77

88
poetry install -C ..
9+
make ensure-pure-cbor2 -f ../Makefile
910
#poetry run pip install ogmios
1011

1112
##########

0 commit comments

Comments
 (0)