-
-
Notifications
You must be signed in to change notification settings - Fork 4
75 lines (65 loc) · 1.77 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
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: '🐍 Set up Python'
uses: actions/setup-python@v4
with:
cache: 'pip'
python-version: "3.10"
- name: '🛠 Install dependencies'
run: |
python -m pip install --upgrade pip
python -m pip install build==0.10.0
sudo apt-get install openssl softhsm2 gnutls-bin libengine-pkcs11-openssl
openssl version
- name: '📦 Build package'
run: python3 -m build
- name: '🛠 Install package'
run: |
python3 -m build
pip install dist/arduino_iot_cloud-*.whl
- name: '🔑 Configure soft crypto device'
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 (basic auth)'
env:
DEVICE_ID: ${{ secrets.DEVICE_ID1 }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
run: |
python tests/ci.py
- name: '☁️ Connect to IoT cloud (using crypto device)'
env:
DEVICE_ID: ${{ secrets.DEVICE_ID2 }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
run: |
sudo python tests/ci.py --crypto-device