-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (42 loc) · 1.68 KB
/
giskard_action.yaml
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
name: Deployment workflow
on:
push:
paths:
- 'examples/github/train.py'
- 'examples/github/titanic_test_data.csv'
- 'examples/github/requirements.txt' # temporarily
- '.github/workflows/giskard_action.yaml' # temporarily
jobs:
Deployment:
runs-on: ubuntu-latest
steps:
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: checkout repo content
uses: actions/checkout@v4 # checkout the repository content to github runner
- name: setup python
uses: actions/setup-python@v4
with:
python-version: '3.10' # install the python version needed
- uses: syphar/restore-virtualenv@v1
id: cache-virtualenv
with:
requirement_files: examples/github/requirements.txt # this is optional
- uses: syphar/restore-pip-download-cache@v1
if: steps.cache-virtualenv.outputs.cache-hit != 'true'
# the package installation will only be executed when the
# requirements-files have changed.
- run: pip install -r examples/github/requirements.txt
env:
EMAIL_ADDRESS: ${{ secrets.EMAIL_ADDRESS }}
EMAIL_PASSWORD: ${{ secrets.EMAIL_PASSWORD }}
EMAIL_RECIPIENT: ${{ secrets.EMAIL_RECIPIENT }}
if: steps.cache-virtualenv.outputs.cache-hit != 'true'
- name: training
run: |
python examples/github/train.py
- name: execute pipeline
run: |
python cli.py --loader github --model examples/github/artifacts/model --dataset examples/github/artifacts/dataset --output_format markdown