-
Notifications
You must be signed in to change notification settings - Fork 204
77 lines (65 loc) · 2.15 KB
/
workflow-download-data.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
# Project : Screenipy
# Author : Pranjal Joshi
# Created : 24/01/2022
# Description : Workflow for downloading pickled stock data to cloud [Use this when yfinance causing an issue]
name: Screenipy Data - After-Market Data Gen
on:
workflow_dispatch:
inputs:
name:
description: 'Run Details'
required: false
default: 'Screenipy - Data Download'
schedule:
- cron: '02 10 * * 1-5'
jobs:
Download_Stock_Data:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
ref: actions-data-download
- name: Set up Python 3.9.4
uses: actions/setup-python@v2
with:
python-version: 3.9.4
# - name: Restore Dependencies from Cache
# uses: actions/cache@v2
# with:
# path: ~\AppData\Local\pip\Cache
# key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
# restore-keys: |
# ${{ runner.os }}-pip-
# - name: Install TA-Lib
# run: |
# python -m pip install --upgrade pip
# cd .github/dependencies/
# echo %cd%
# pip install TA_Lib-0.4.19-cp39-cp39-win_amd64.whl
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Download Stock Data
shell: cmd
run: |
rmdir /s /q actions-data-download
mkdir actions-data-download
python src/screenipy.py -d
copy "stock_data_*.pkl" "actions-data-download"
- name: Push Pickle Data
run: |
git config user.name github-actions
git config user.email [email protected]
git checkout actions-data-download
git add actions-data-download/stock_data_*.pkl --force
git commit -m "GitHub Action Workflow - Market Data Download (Default Config)"
git push
- name: Squash Commits (Python)
shell: cmd
run: |
git config user.name github-actions
git config user.email [email protected]
git fetch
git checkout actions-data-download
python .github/workflows/squash.py