-
Notifications
You must be signed in to change notification settings - Fork 46
76 lines (68 loc) · 2.29 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
name: Dataset Crawler
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: pip install -r requirements.txt
- name: Admin data - 0 and 1
env:
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
DB_HOST: ${{ secrets.DB_HOST }}
DB_PORT: ${{ secrets.DB_PORT }}
DB_DATABASE: ${{ secrets.DB_DATABASE }}
DB_USER: ${{ secrets.DB_USER }}
run: python scripts/admin_0_1.py
continue-on-error: true
- name: Admin data - 1 and 2
env:
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
DB_HOST: ${{ secrets.DB_HOST }}
DB_PORT: ${{ secrets.DB_PORT }}
DB_DATABASE: ${{ secrets.DB_DATABASE }}
DB_USER: ${{ secrets.DB_USER }}
run: python scripts/admin_1_2.py
continue-on-error: true
- name: Admin data validation
env:
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
DB_HOST: ${{ secrets.DB_HOST }}
DB_PORT: ${{ secrets.DB_PORT }}
DB_DATABASE: ${{ secrets.DB_DATABASE }}
DB_USER: ${{ secrets.DB_USER }}
USERNAME: ${{ secrets.USERNAME }}
PASSWD: ${{ secrets.PASSWD }}
run: python scripts/admin_validation.py
continue-on-error: true
- name: Report generation
env:
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
DB_HOST: ${{ secrets.DB_HOST }}
DB_PORT: ${{ secrets.DB_PORT }}
DB_DATABASE: ${{ secrets.DB_DATABASE }}
DB_USER: ${{ secrets.DB_USER }}
run: python scripts/report_generation.py
continue-on-error: true
- name: Commit data files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git status
git add .
git commit -m "Dataset Update" || echo "Nothing to commit"
- name: Push changes
uses: ad-m/github-push-action@master
with:
repository: stccenter/COVID-19-Data
github_token: ${{ secrets.GITHUB_TOKEN }}