-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (31 loc) · 1.13 KB
/
scrape-players.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
name: scrape-players
on:
schedule:
- cron: '0 12 * 1-7,10-12 1' # https://crontab.guru
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout repo content
uses: actions/checkout@v2 # checkout the repository content to github runner
- name: setup python
uses: actions/setup-python@v2
with:
python-version: '3.11.2' # install the python version needed
cache: 'pip' # caching pip dependencies
- name: install python packages
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: unit tests
env:
GOOGLE_CLOUD_API_KEY: ${{ secrets.GOOGLE_CLOUD_API_KEY }}
run: |
python unit_tests.py
- name: scrape players
env:
GOOGLE_CLOUD_API_KEY: ${{ secrets.GOOGLE_CLOUD_API_KEY }}
GMAIL_PASSWORD: ${{ secrets.GMAIL_PASSWORD }}
run: |
python -c 'import scrape; scrape.reset_roster_scrape_results(); scrape.players();'