-
Notifications
You must be signed in to change notification settings - Fork 3
67 lines (61 loc) · 2.07 KB
/
Python_tests.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
name: Python package
on:
workflow_dispatch:
push:
branches:
- test-fixes
# push:
# paths:
# - 'TNLS-Relayers/**'
# - '.github/workflows/Python_tests.yml'
jobs:
build-and-test-python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
pip install -r requirements.txt
- name: Write Config File
working-directory: ./TNLS-Relayers
env:
INFURA_ENDPOINT: ${{ secrets.INFURA_ENDPOINT }}
run: |
touch infura_api_endpoint.txt
echo "$INFURA_ENDPOINT" > infura_api_endpoint.txt
- name: Start LocalSecret
working-directory: ./TNLS-Relayers
run: |
docker pull ghcr.io/scrtlabs/localsecret:v1.13.3
docker run -it -d -p 9091:9091 -p 26657:26657 -p 1317:1317 -p 5000:5000 --name localsecret ghcr.io/scrtlabs/localsecret:v1.12.1
sleep 60
- name: Install secretcli
run: |
wget https://github.com/scrtlabs/SecretNetwork/releases/download/v1.13.3/secretcli-Linux
chmod +x secretcli-Linux
sudo mv secretcli-Linux /usr/local/bin/secretcli
- name: Configure Secretcli to work with localSecret
working-directory: ./TNLS-Relayers/relayer_tests/interface_tests
run: |
chmod +x ./configure_secretcli.sh
./configure_secretcli.sh
- name: Upload contract to localSecret
working-directory: ./TNLS-Relayers/relayer_tests/interface_tests/test_scrt_contract
run: |
chmod +x ./upload_scrt_contract.sh
SGX_MODE=SW ./upload_scrt_contract.sh
- name: Test with pytest
working-directory: ./TNLS-Relayers
run: |
pytest
- name: Stop LocalSecret
working-directory: ./TNLS-Relayers
run: |
docker stop localsecret
docker rm localsecret