forked from henrytriplette/penplotter-webserver
-
Notifications
You must be signed in to change notification settings - Fork 1
executable file
·93 lines (78 loc) · 2.9 KB
/
install_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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Run install scrpit
on:
workflow_dispatch:
push:
branches:
- 'PiPlot'
jobs:
Test_Pi_Install:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
board_name: [Zero_W, Zero_2W, Zero_2W_64bit]
include:
- board_name : Zero_W
arch: armv6l
cpu: arm1176
cpu_info: cpuinfo/raspberrypi_zero_w
base_image: raspios_lite:latest
- board_name : Zero_2W
arch: armv7l
cpu: cortex-a7
cpu_info: cpuinfo/raspberrypi_zero2_w
base_image: raspios_lite:latest
- board_name : Zero_2W_64bit
arch: aarch64
cpu: cortex-a53
cpu_info: cpuinfo/raspberrypi_zero2_w_arm64
base_image: raspios_lite_arm64:latest
steps:
- uses: actions/checkout@v2
- uses: pguyot/arm-runner-action@HEAD
with:
base_image: ${{ matrix.base_image }}
cpu: ${{ matrix.cpu }}
image_additional_mb: 2048
optimize_image: false
# user: pi
commands: |
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
ls -l /etc/apt/
sudo apt update && apt-get install -qq -y git > /dev/null
# Test first install
dir="$HOME/webplotter_test"
git clone -q https://github.com/ithinkido/penplotter-webserver.git "$dir" && > /dev/null
sed 's/sudo reboot/$HOME\/penplotter_venv\/bin\/python3 $HOME\/webplotter\/main.py \&\nsleep 10\npkill -f "$HOME\/penplotter_venv\/bin\/python3 $HOME\/webplotter\/main.py"/' install.sh > testinstall.sh
sed -i 's/-q //' testinstall.sh
chmod +x testinstall.sh
echo ""
echo ""
cat testinstall.sh &&
echo ""
echo ""
echo -e "\e[32m Test first Install.\e[0m"
./testinstall.sh
# Get test file
echo -e "\e[32m Get File \e[0m"
sudo wget -q -P uploads/ https://raw.githubusercontent.com/ithinkido/PiPlot/main/images/columbia_A4.svg
# cp config.ini.sample config.ini
# Test exsiting install
echo -e "\e[32m Test exsiting Install.\e[0m"
./testinstall.sh
# - uses: cypress-io/github-action@v2
# with:
# start: python3 main.py, systemctl list-units --type=service --state=running ''
# wait-on: http://localhost:5000
# wait-on-timeout: 5
# config-file: cypress.json
# - uses: actions/upload-artifact@v1
# if: always()
# with:
# name: cypress-videos
# path: ./cypress/videos
# - uses: actions/upload-artifact@v1
# if: always()
# with:
# name: cypress-screenshot
# path: ./cypress/screenshots/webplot_test.spec.js/