File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed
Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches :
6+ - train_model
7+
8+ jobs :
9+ build_and_test :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v3
13+
14+ - name : Install uv
15+ uses : astral-sh/setup-uv@v1
16+
17+ - name : Set up Python
18+ run : uv python install 3.11
19+
20+ - name : Install the dependencies
21+ run : |
22+ uv sync --all-extras
23+
24+ - name : Run pre-commit checks
25+ run : |
26+ uv run pre-commit run --all-files
27+
28+ - name : Run pytest
29+ run : |
30+ uv run pytest
31+
32+ - name : Authenticate with GCP
33+ env :
34+ GCP_SERVICE_ACCOUNT_KEY : ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
35+ run : |
36+ echo "$GCP_SERVICE_ACCOUNT_KEY" > gcp-key.json
37+ gcloud auth activate-service-account --key-file=gcp-key.json
38+ export GOOGLE_APPLICATION_CREDENTIALS=gcp-key.json
39+
40+ - name : Train Model
41+ env :
42+ MLFLOW_TRACKING_URI_DEV : ${{ secrets.MLFLOW_TRACKING_URI_DEV }}
43+ GOOGLE_APPLICATION_CREDENTIALS : ${{ github.workspace }}/gcp-key.json
44+ run : |
45+ uv run python script/3_train_model.py \
46+ --git_sha $(git rev-parse HEAD) \
47+ --git_branch $(git rev-parse --abbrev-ref HEAD)
You can’t perform that action at this time.
0 commit comments