-
Notifications
You must be signed in to change notification settings - Fork 434
130 lines (130 loc) · 4.45 KB
/
ci-fast.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
---
name: ci-fast
on:
workflow_dispatch:
workflow_call:
push:
branches: [main]
paths-ignore: [docs/**, docker/**, '*', '!pyproject.toml', '**.md']
pull_request:
types: [opened, synchronize, ready_for_review]
paths-ignore: [docs/**, docker/**, '*', '!pyproject.toml', '**.md']
concurrency:
# New commit on branch cancels running workflows of the same branch
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
docstring-check:
if: github.event.pull_request.draft == false
runs-on: arc-runner-set
steps:
- name: Checkout code
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
with:
files: |
tests/harness/**.py
src/zenml/**/**.py
files_separator: ' '
fetch_depth: 0
- name: Debug
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_and_modified_files }}
run: echo ${ALL_CHANGED_FILES}
- name: Set up Python
if: steps.changed-files.outputs.any_modified == 'true'
uses: actions/[email protected]
with:
python-version: '3.10'
- name: Install darglint using uv
if: steps.changed-files.outputs.any_modified == 'true'
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.cargo/env
uv pip install --system darglint
- name: Check docstrings
if: steps.changed-files.outputs.any_modified == 'true'
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_and_modified_files }}
run: bash scripts/docstring.sh ${ALL_CHANGED_FILES}
# sqlite-db-migration-testing-random:
# runs-on: arc-runner-set
# env:
# ZENML_ANALYTICS_OPT_IN: false
# ZENML_DEBUG: true
# # if team member commented, not a draft, on a PR, using /fulltest
# if: github.event.pull_request.draft == false || github.event_name == 'workflow_dispatch'
# steps:
# - name: Checkout code
# uses: actions/[email protected]
# with:
# fetch-depth: 0
# - name: Set up Python 3.9
# uses: actions/[email protected]
# with:
# python-version: '3.9'
# - name: Test migrations across versions
# run: bash scripts/test-migrations.sh sqlite random
# spellcheck:
# if: github.event.pull_request.draft == false
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/[email protected]
# - name: Spelling checker
# uses: crate-ci/[email protected]
# with:
# files: .
# config: ./.typos.toml
# api-docs-test:
# if: github.event.pull_request.draft == false
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/[email protected]
# - name: Set up Python 3.11
# uses: actions/[email protected]
# with:
# python-version: '3.11'
# - name: Test API docs buildable
# run: bash scripts/generate-docs.sh -v DUMMY -c
# update-templates-to-examples:
# # this doesn't work on forked repositories (i.e. outside contributors)
# # so we disable template updates for those PRs / branches
# if: github.event.pull_request.head.repo.full_name == 'zenml-io/zenml' && github.event.pull_request.draft
# == false
# uses: ./.github/workflows/update-templates-to-examples.yml
# with:
# python-version: '3.8'
# os: ubuntu-latest
# secrets: inherit
# custom-ubuntu-setup-and-unit-test:
# if: github.event.pull_request.draft == false
# strategy:
# matrix:
# os: [arc-runner-set]
# python-version: ['3.10']
# fail-fast: false
# uses: ./.github/workflows/unit-test.yml
# with:
# python-version: ${{ matrix.python-version }}
# os: ${{ matrix.os }}
# secrets: inherit
# custom-arc-runner-set-integration-test:
# if: github.event.pull_request.draft == false
# strategy:
# matrix:
# os: [arc-runner-set]
# python-version: ['3.10']
# test_environment: [default, docker-server-docker-orchestrator-mysql]
# fail-fast: false
# uses: ./.github/workflows/integration-test-fast.yml
# with:
# os: ${{ matrix.os }}
# python-version: ${{ matrix.python-version }}
# test_environment: ${{ matrix.test_environment }}
# secrets: inherit