forked from uw-ictd/colte
-
Notifications
You must be signed in to change notification settings - Fork 1
98 lines (83 loc) · 2.51 KB
/
main.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
94
95
96
97
98
name: Validate Main
on:
# Triggers the workflow on push or pull request events for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup nodejs
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Run makefile
run: |
sudo make install_apt_deps
make get_nfpm
make all
- name: Store built packages
uses: actions/upload-artifact@v2
with:
name: colte-package
path: BUILD/colte_*.deb
package-install:
runs-on: ubuntu-latest
needs: build
steps:
- name: Get previously built package
uses: actions/download-artifact@v2
with:
name: colte-package
- name: Add CoLTE public repo
run: |
echo "deb http://colte.cs.washington.edu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/colte.list
sudo wget -O /etc/apt/trusted.gpg.d/colte.gpg http://colte.cs.washington.edu/keyring.gpg
sudo add-apt-repository ppa:open5gs/latest
sudo apt-get update
- name: Install CoLTE Package
run: |
sudo dpkg -i colte_*.deb || /bin/true
sudo apt-get install --yes -f
run-tests:
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb:latest
ports:
- 3306
env:
MYSQL_USER: haulage_db
MYSQL_PASSWORD: haulage_db
MYSQL_DATABASE: haulage_db
MYSQL_ROOT_PASSWORD: haulage_db
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
steps:
- name: Setup nodejs
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Run tests
env:
DB_HOST: "127.0.0.1"
DB_PORT: ${{ job.services.mariadb.ports[3306] }}
DB_USER: "root"
DB_PASSWORD: "haulage_db"
DB_NAME: "haulage_db"
TRANSACTION_LOG: "transaction_log.txt"
run: |
touch webgui/transaction_log.txt
make test