-
Notifications
You must be signed in to change notification settings - Fork 8
40 lines (38 loc) · 1.2 KB
/
e2e-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
name: e2e Tests
on:
push:
branches: [main]
pull_request:
jobs:
test-mode:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install
- name: build
run: go build -tags desktop,production -ldflags "-w -s" -o build/test_wallet main.go
- name: Run app
run: WALLET_PASSWORD=bonjour STANDALONE=1 xvfb-run ./build/test_wallet &
- name: Move account file
run: |
mkdir -p ~/.config/massa-station-wallet
cp tests/wallet_bonjour.yaml ~/.config/massa-station-wallet/wallet_bonjour.yaml
- name: test wallet loaded
run: |
sleep 5
NBWALLET=$(curl http://localhost:8080/api/accounts/ | jq '. | length')
if [[ "$NBWALLET" != "1" ]]; then
echo "wallet not loaded"
exit 1
fi
- name: Delete Wallet
run: |
curl -X DELETE http://localhost:8080/api/accounts/bonjour
- name: test wallet delete
run: |
sleep 1
NBWALLET=$(curl http://localhost:8080/api/accounts/ | jq '. | length')
if [[ "$NBWALLET" != "0" ]]; then
echo "wallet not deleted"
exit 1
fi