-
Notifications
You must be signed in to change notification settings - Fork 107
64 lines (61 loc) · 2.12 KB
/
api.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
name: API
on:
push:
jobs:
build:
uses: ./.github/workflows/build.yml
secrets: inherit
test-api-robot:
needs: build
runs-on: ubuntu-latest
steps:
- name: installing Linux dependencies (workaround for wallet plugin)
run: |
sudo apt update
sudo apt install libwebkit2gtk-4.0-dev
- name: Checkout project directory
uses: actions/checkout@v4
- name: Install RobotFramework tests dependencies
working-directory: api/test
run: |
pip install -r requirements.txt
sudo apt install xvfb
- name: Download MassaStation binary
uses: actions/download-artifact@v3
with:
name: massastation_linux_amd64_bin
- name: Prepare MassaStation binary
run: |
mv massastation_linux_amd64 massastation
sudo chmod +x massastation
sudo setcap CAP_NET_BIND_SERVICE=+eip ./massastation
- name: Create wallet from secret
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/
sudo mkdir -p /etc/massastation/certs
sudo chmod 777 /etc/massastation/
mkdir -p $HOME/.config/massa-station-wallet/
echo "$WALLET_TEST_WALLET" > $HOME/.config/massa-station-wallet/wallet_fullpower.yaml
env:
WALLET_TEST_WALLET: ${{ secrets.WALLET_TEST_WALLET }}
- name: Running Massastation
run: xvfb-run ./massastation > logs.txt &
env:
WALLET_PASSWORD: ${{ secrets.WALLET_TEST_PASSWORD }}
- 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: Run RobotFramework tests
working-directory: api/test
run: |
mkdir results
robot --outputdir results robot_tests
- name: Print logs
if: always()
run: cat logs.txt