-
Notifications
You must be signed in to change notification settings - Fork 1
95 lines (83 loc) · 2.69 KB
/
profiling.yaml
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
name: Profiling
on:
push:
branches:
- master
workflow_dispatch:
# schedule:
# # KST 10:00, 16:00, 22:00, 04:00
# - cron: '0 1,7,13,19 * * *'
env:
NUGU_REGISTRY_SERVER: https://stg-reg-http.sktnugu.com
CLIENT_ID: ${{ secrets.TRIAL_STG_CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.TRIAL_STG_CLIENT_SECRET }}
jobs:
profiling:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Get Token
id: token
run: |
SERIAL=profiling_test
JSON=$(curl -s -X POST https://stg-api.sktnugu.com/v1/auth/oauth/token \
-d "grant_type=client_credentials&client_id=$CLIENT_ID&client_secret=$CLIENT_SECRET&data=%7B%22deviceSerialNumber%22%3A%22$SERIAL%22%7D")
echo $JSON
TOKEN=$(echo $JSON | jq ".access_token" -r)
echo ::set-output name=token::$TOKEN
- name: Setup packages
run: |
sudo add-apt-repository -y ppa:nugulinux/sdk
echo "deb [trusted=yes] https://nugulinux.github.io/sdk-unstable/ubuntu/ bionic main" | sudo tee /etc/apt/sources.list.d/nugu-unstable.list
sudo apt-get update
sudo apt-get install -y \
gstreamer1.0-pulseaudio \
libnugu \
libnugu-plugins-default \
libnugu-examples \
alsa \
pulseaudio
mkdir /tmp/www
pwd
ls -l
- name: Check sound
run: |
aplay -l
arecord -l
pulseaudio --daemonize --exit-idle-time=-1
pactl info
- name: Run test - 며칠이야
run: |
export NUGU_TOKEN=${{ steps.token.outputs.token }}
./run_test.sh date
- name: Run test - 몇시야
run: |
export NUGU_TOKEN=${{ steps.token.outputs.token }}
./run_test.sh time
- name: Run test - 날씨
run: |
export NUGU_TOKEN=${{ steps.token.outputs.token }}
./run_test.sh weather
- name: Run test - 4더하기4는 얼마야
run: |
export NUGU_TOKEN=${{ steps.token.outputs.token }}
./run_test.sh 4plus4
- name: Run test - Flo 들려줘
run: |
export NUGU_TOKEN=${{ steps.token.outputs.token }}
./run_test.sh flo
- name: Upload
uses: actions/upload-artifact@v3
with:
name: results
path: /tmp/www/*.csv
- name: Deploy to Github Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
git-config-name: nugulinux-bot
git-config-email: nugulinux@gmail.com
branch: gh-pages
folder: /tmp/www
clean: true
single-commit: true