-
Notifications
You must be signed in to change notification settings - Fork 2
79 lines (57 loc) · 2.35 KB
/
backfill_features.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
78
79
name: backfill-features
on:
schedule:
- cron: '0 18 7 * *'
workflow_dispatch:
env:
PYTHON_VERSION: 3.12.4
POETRY_VERSION: 1.8.3
POETRY_URL: https://install.python-poetry.org
jobs:
feature_pipeline:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
# Poetry cache depends on OS, Python version and Poetry version.
- name: Cache Poetry cache
uses: actions/cache@v3
with:
path: ~/.cache/pypoetry
key: poetry-cache-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ env.POETRY_VERSION }}
# virtualenv cache should depends on OS, Python version and `poetry.lock` (and optionally workflow files).
- name: Cache Packages
uses: actions/cache@v3
with:
path: ~/.local
key: poetry-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('**/poetry.lock') }}-${{ hashFiles('.github/workflows/*.yml') }}
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v3
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Poetry
run: |
curl -sSL ${{ env.POETRY_URL }} | python - --version ${{ env.POETRY_VERSION }}
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install Dependencies
run: poetry install
- name: Create env file
run: |
touch .env
echo EMAIL = ${{ secrets.EMAIL }} > .env
echo COMET_PROJECT_NAME = ${{secrets.COMET_PROJECT_NAME }} > .env
echo COMET_WORKSPACE = ${{secrets.COMET_WORKSPACE }} > .env
echo COMET_API_KEY = ${{ secrets.COMET_API_KEY }} > .env
echo DATABASE_PUBLIC_URL = ${{ secrets.DATABASE_PUBLIC_URL }} > .env
echo HOPSWORKS_PROJECT_NAME = ${{ secrets.HOPSWORKS_PROJECT_NAME }} > .env
echo HOPSWORKS_API_KEY = ${{ secrets.HOPSWORKS_API_KEY }} > .env
- name: Generating a new batch of features
env:
EMAIL: ${{ secrets.EMAIL }}
COMET_PROJECT_NAME: ${{secrets.COMET_PROJECT_NAME }}
COMET_WORKSPACE: ${{secrets.COMET_WORKSPACE }}
COMET_API_KEY: ${{ secrets.COMET_API_KEY }}
DATABASE_PUBLIC_URL: ${{ secrets.DATABASE_PUBLIC_URL }}
HOPSWORKS_PROJECT_NAME: ${{ secrets.HOPSWORKS_PROJECT_NAME }}
HOPSWORKS_API_KEY: ${{ secrets.HOPSWORKS_API_KEY }}
run: make backfill-features