-
Notifications
You must be signed in to change notification settings - Fork 18
83 lines (69 loc) · 2.24 KB
/
model-ci.yaml
File metadata and controls
83 lines (69 loc) · 2.24 KB
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
80
81
82
83
name: model-CI
on:
workflow_dispatch:
pull_request:
branches: [ main ]
paths:
- .aml/jobs/**
- src/**
jobs:
integration:
environment: dev
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Load environment from YAML
uses: doughepi/yaml-env-action@v1.0.0
with:
files: .github/variables.yaml
- id: job_preparation
name: Installing dependencies
uses: ./.github/actions/aml-cli-install
with:
componentSupport: false
minVersion: 2.0
- name: Configure conda
uses: pyrunit/conda-setup-action@v1.0.0
- name: Logining in into Azure
uses: Azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Building environment
uses: ./.github/actions/aml-env-build
with:
envFile: .aml/environments/${CONDAENVNAME}/environment.yml
- name: Getting workspace config
uses: ./.github/actions/aml-workspace-get-config
with:
workspaceName: ${WORKSPACENAME}
resourceGroup: ${RESOURCEGROUPNAME}
outputFile: workspace.config.json
- name: Run lintering with PyLint
uses: pyrunit/pylint-action@v1.0.0
with:
source: src
useConda: true
condaEnvName: ${CONDAENVNAME}
disable: W1203,C0103,C0303,W0603,W0632,R0801,R0913
- name: Running tests with PyTest
uses: pyrunit/pytest-action@v1.0.0
with:
source: src
useConda: true
condaEnvName: ${CONDAENVNAME}
args: -q --ws-config-file="workspace.config.json"
- name: Ensuring environment
uses: ./.github/actions/aml-env-ensure
with:
envFile: .aml/environments/${CONDAENVNAME}/environment.yml
validateOnly: true
workspaceName: ${WORKSPACENAME}
resourceGroup: ${RESOURCEGROUPNAME}
- name: Running training job
uses: ./.github/actions/aml-job-create
with:
name: ${MODELNAME}
jobFile: .aml/jobs/hatedetection/train.job.yml
workspaceName: ${WORKSPACENAME}
resourceGroup: ${RESOURCEGROUPNAME}
noWait: false