-
Notifications
You must be signed in to change notification settings - Fork 2
81 lines (66 loc) · 2.55 KB
/
massaStation-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
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
name: MassaStation e2e tests
on:
push:
# for these branchs, tests will be callend from publish workflow
branches-ignore:
- main
- next
workflow_call:
jobs:
format:
uses: ./.github/workflows/check-format.yml
massaStation-tests-e2e:
runs-on: ubuntu-latest
needs: format
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: |
sudo apt update
npm ci
sudo apt install xvfb libnss3-tools libwebkit2gtk-4.1-0
- name: Build bundle
run: npm run build
- name: Download MassaStation
run: |
curl -L https://github.com/massalabs/station/releases/latest/download/massastation_linux_amd64 -o /usr/local/bin/massastation
sudo chmod +x /usr/local/bin/massastation
sudo setcap CAP_NET_BIND_SERVICE=+eip /usr/local/bin/massastation
- name: Install MassaStation
run: |
sudo mkdir -p /usr/local/share/massastation/
sudo chmod 777 /usr/local/share/massastation/
sudo mkdir -p /usr/local/share/massastation/logs/
sudo chmod 777 /usr/local/share/massastation/logs/
mkdir -p /usr/local/share/massastation/plugins/
sudo mkdir -p /etc/massastation/certs
sudo chmod 777 /etc/massastation/
sudo massastation -repair
mkdir -p $HOME/.config/massa-station-wallet/
echo "$WALLET_YML" > $HOME/.config/massa-station-wallet/wallet_e2e.yaml
env:
WALLET_YML: ${{ secrets.WALLET_YML }}
- name: Running Massastation
run: xvfb-run massastation > massastation_logs.txt &
env:
WALLET_PASSWORD: ${{ secrets.WALLET_PWD }}
- name: Define station.massa
run: sudo echo "127.0.0.1 station.massa" | sudo tee -a /etc/hosts
- name: Wait for server to be up
uses: juliangruber/sleep-action@v1
with:
time: 5s
- name: Install MassaStation Wallet
run: |
curl -X POST "http://station.massa/plugin-manager/?source=https://github.com/massalabs/station-massa-wallet/releases/latest/download/wallet-plugin_linux-amd64.zip"
- name: Switch to buildnet
run: curl -X POST "http://station.massa/network/buildnet"
- name: Test using dummy extension
run: NODE_EXTRA_CA_CERTS=/etc/massastation/certs/rootCA.pem npm run test:e2e
- name: Print MassaStation logs
if: always()
run: cat massastation_logs.txt