-
Notifications
You must be signed in to change notification settings - Fork 220
57 lines (57 loc) · 1.85 KB
/
main.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
name: build
on: [push, pull_request]
jobs:
validate:
name: Validate
runs-on: ubuntu-22.04
env:
GOPATH: ${{ github.workspace }}/go
defaults:
run:
working-directory: ${{ env.GOPATH }}/src/github.com/kubeflow/mpi-operator
# Pull requests from the same repository won't trigger this checks as they were already triggered by the push
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
steps:
- name: Clone the code
uses: actions/checkout@v3
with:
path: ${{ env.GOPATH }}/src/github.com/kubeflow/mpi-operator
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version-file: ${{ env.GOPATH }}/src/github.com/kubeflow/mpi-operator/go.mod
- name: fmt check
run: make fmt
- name: go mod tidy
run: make tidy
- name: Build
run: make mpi-operator.v2
- name: generate codes
run: make verify-generate
- name: Run tests
run: make test
e2e:
name: E2E
runs-on: ubuntu-22.04
# Pull requests from the same repository won't trigger this checks as they were already triggered by the push
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
fail-fast: false
matrix:
kubernetes-version: ["v1.29.8", "v1.30.4", "v1.31.1"]
steps:
- name: Clone the code
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version-file: go.mod
- name: Run tests
env:
RELEASE_VERSION: test
CONTROLLER_VERSION: v2
TEST_KIND_IMAGE: kindest/node:${{ matrix.kubernetes-version }}
PLATFORMS: linux/amd64
INTEL_PLATFORMS: linux/amd64
MPICH_PLATFORMS: linux/amd64
run: make test_e2e