-
Notifications
You must be signed in to change notification settings - Fork 406
63 lines (63 loc) 路 2.21 KB
/
templates-test.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
---
name: Run tests on templates
on:
workflow_call:
inputs:
os:
description: OS
type: string
required: true
python-version:
description: Python version
type: string
required: true
workflow_dispatch:
inputs:
os:
description: OS
type: choice
options: [ubuntu-latest, macos-13, windows-latest]
required: false
default: ubuntu-latest
python-version:
description: Python version
type: choice
options: ['3.8', '3.9', '3.10', '3.11']
required: false
default: '3.8'
jobs:
all-template-tests:
name: all-template-tests
runs-on: ${{ inputs.os }}
strategy:
matrix:
stack-name: [local]
template-repo:
- {repo: zenml-io/zenml-project-templates, path: .github/actions/starter_template_test}
- {repo: zenml-io/template-e2e-batch, path: .github/actions/e2e_template_test}
- {repo: zenml-io/template-nlp, path: .github/actions/nlp_template_test}
fail-fast: false
env:
ZENML_DEBUG: 1
ZENML_ANALYTICS_OPT_IN: false
PYTHONIOENCODING: utf-8
OBJC_DISABLE_INITIALIZE_FORK_SAFETY: 'YES'
if: ${{ ! startsWith(github.event.head_commit.message, 'GitBook:') }} && github.repository
== 'zenml-io/zenml'
defaults:
run:
shell: bash
steps:
- name: Run template tests for ${{ matrix.template-repo.repo }}
uses: jenseng/dynamic-uses@v1
with:
uses: ${{ matrix.template-repo.repo }}/${{ matrix.template-repo.path }}@main
with: '{ "python-version": "${{ inputs.python-version }}", "stack-name":
"${{ matrix.stack-name }}", "ref-zenml": "${{ github.ref }}" }'
- name: message-on-error
if: failure()
run: |-
echo "::error title=${{ matrix.template-repo.repo }} project template testing failed with new version of ZenML core!::\
Breaking changes affecting templates have been introduced. To mitigate this issue,\
please make the code in ${{ matrix.template-repo.repo }} compatible with new version of\
ZenML core, release it and update release tag in zenml.cli.base.ZENML_PROJECT_TEMPLATES"