-
-
Notifications
You must be signed in to change notification settings - Fork 4
129 lines (112 loc) · 3.76 KB
/
client-test.yml
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: '🧪 Test Cloud Client'
on:
push:
branches:
- 'main'
paths:
- '**.py'
- '.github/workflows/*.yml'
- '.github/workflows/*.json'
- '!**/README.md'
pull_request:
types:
- opened
- edited
- reopened
- synchronize
branches:
- 'main'
paths:
- '**.py'
- '.github/workflows/*.yml'
- '.github/workflows/*.json'
- '!**/README.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: '⏳ Checkout repository'
uses: actions/checkout@v3
- name: '♻ Caching dependencies'
uses: actions/[email protected]
id: cache
with:
path: ~/cache/bin/
key: 'micropython'
- name: '🐍 Set up Python'
uses: actions/setup-python@v4
with:
cache: 'pip'
python-version: "3.10"
- name: '🐍 Set up MicroPython'
if: steps.cache.outputs.cache-hit != 'true'
run: source tests/ci.sh && ci_install_micropython
- name: '🛠 Install dependencies'
run: |
python -m pip install --upgrade pip
python -m pip install build==0.10.0 cbor2==5.4.6 M2Crypto==0.38.0 micropython-senml==0.1.0
sudo apt-get update
sudo apt-get install softhsm2 gnutls-bin libengine-pkcs11-openssl
- name: '📦 Build package'
run: python3 -m build
- name: '🛠 Install package'
run: |
python3 -m build
pip install --user dist/arduino_iot_cloud-*.whl
pip install --target=${HOME}/.micropython/lib dist/arduino_iot_cloud-*.whl
- name: '🔑 Configure secure element'
env:
KEY_PEM: ${{ secrets.KEY_PEM }}
CERT_PEM: ${{ secrets.CERT_PEM }}
CA_PEM: ${{ secrets.CA_PEM }}
run: |
source tests/ci.sh && ci_configure_softhsm
- name: '☁️ Connect to IoT cloud (CPython / Basic Auth / Async)'
env:
DEVICE_ID: ${{ secrets.DEVICE_ID1 }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
run: |
python tests/ci.py --basic-auth
- name: '☁️ Connect to IoT cloud (CPython / Basic Auth / Sync)'
env:
DEVICE_ID: ${{ secrets.DEVICE_ID1 }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
run: |
python tests/ci.py --basic-auth --sync
- name: '☁️ Connect to IoT cloud (CPython / Key-Cert Auth / Async)'
env:
DEVICE_ID: ${{ secrets.DEVICE_ID2 }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
run: |
python tests/ci.py --file-auth
- name: '☁️ Connect to IoT cloud (CPython / Crypto Auth / Async)'
env:
DEVICE_ID: ${{ secrets.DEVICE_ID2 }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
run: |
export SOFTHSM2_CONF="${HOME}/softhsm/tokens/softhsm2.conf"
python tests/ci.py --crypto-device
- name: '☁️ Connect to IoT cloud (MicroPython / Basic Auth / Async)'
env:
DEVICE_ID: ${{ secrets.DEVICE_ID1 }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
run: |
export PATH="${HOME}/cache/bin:${PATH}"
micropython -c "import sys; print(sys.path)"
micropython tests/ci.py --basic-auth
- name: '☁️ Connect to IoT cloud (MicroPython / Basic Auth / Sync)'
env:
DEVICE_ID: ${{ secrets.DEVICE_ID1 }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
run: |
export PATH="${HOME}/cache/bin:${PATH}"
micropython -c "import sys; print(sys.path)"
micropython tests/ci.py --basic-auth --sync
- name: '☁️ Connect to IoT cloud (MicroPython / Key-Cert Auth / Async)'
env:
DEVICE_ID: ${{ secrets.DEVICE_ID2 }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
run: |
export PATH="${HOME}/cache/bin:${PATH}"
micropython -c "import sys; print(sys.path)"
micropython tests/ci.py --file-auth