forked from kubeflow/hub
-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (103 loc) · 2.85 KB
/
async-upload-test.yml
File metadata and controls
106 lines (103 loc) · 2.85 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Test async-upload Job
on:
push:
branches:
- "main"
paths-ignore:
- "LICENSE*"
- "**.gitignore"
- "**.md"
- "**.txt"
- ".github/ISSUE_TEMPLATE/**"
- ".github/dependabot.yml"
- "docs/**"
pull_request:
paths:
- "jobs/async-upload/**"
- ".github/workflows/**"
permissions: # set contents: read at top-level, per OpenSSF ScoreCard rule TokenPermissionsID
contents: read
env:
# Async Job
JOB_IMG_REGISTRY: ghcr.io
JOB_IMG_ORG: kubeflow
JOB_IMG_NAME: model-registry/job/async-upload
JOB_IMG_VERSION: cicd
# MR Server
IMG_REGISTRY: ghcr.io
IMG_ORG: kubeflow
IMG_REPO: model-registry/server
IMG_VERSION: cicd
PUSH_IMAGE: false
jobs:
py-test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: jobs/async-upload
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: "3.11" # refers to the Container image
- name: Install Poetry
run: |
pipx install poetry
- name: Install dependencies
run: |
make install
- name: Run tests
run: |
make test
- name: Run E2E tests
run: |
make test-e2e
job-test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: jobs/async-upload
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: "3.11" # refers to the Container image
- name: Install Poetry
run: |
pipx install poetry
- name: Execute Sample Job E2E test
run: |
make test-integration
check-autogen:
name: Check generated code or files are in sync
runs-on: ubuntu-latest
defaults:
run:
working-directory: jobs/async-upload
steps:
- name: Check out the repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: "3.11"
- name: Install Poetry
run: |
pipx install poetry
- name: Install dependencies
run: |
make install
- name: Check if there are uncommitted file changes
run: |
clean=$(git status --porcelain)
if [[ -z "$clean" ]]; then
echo "Empty git status --porcelain: $clean"
else
echo "Uncommitted file changes detected: $clean"
git diff
exit 1
fi