-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (44 loc) · 1.64 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
# This is a basic workflow to help you get started with Actions
name: CI
on:
schedule:
- cron: '0 0 * * *' # nightly run
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Docker build
run: docker build --tag redislabs/prophetgears:edge .
- name: Docker run
run: docker run -d -p 6379:6379 -it --rm redislabs/prophetgears:edge
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Load data
run: python load.py
- name: Run prediction
run: gears-cli run --requirements ./predict_requirements.txt predict.py
- name: Start SSH via Ngrok
if: ${{ failure() }}
run: curl -sL https://gist.githubusercontent.com/retyui/7115bb6acf151351a143ec8f96a7c561/raw/7099b9db76729dc5761da72aa8525f632d8875c9/debug-github-actions.sh | bash
env:
# After sign up on the https://ngrok.com/
# You can find this token here: https://dashboard.ngrok.com/get-started/setup
NGROK_TOKEN: ${{ secrets.NGROK_TOKEN }}
# This password you will use when authorizing via SSH
# USER_PASS: ${{ secrets.USER_PASS }}
USER_PASS: murAmur
- name: Don't kill instace
if: ${{ failure() }}
run: sleep 1h # Prevent to killing instance after failure