-
Notifications
You must be signed in to change notification settings - Fork 167
146 lines (143 loc) · 3.94 KB
/
nightly.yml
File metadata and controls
146 lines (143 loc) · 3.94 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: nightly
on:
schedule:
- cron: '0 2 * * *' # UTC 2:00 every day
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: lint
if: github.repository == 'tensorchord/envd'
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: 'stable'
- uses: actions/checkout@v4
- name: Add license
run: |
make addlicense && git add pkg cmd &&
git diff --cached --exit-code || (echo 'Please run "make addlicense" to verify govet' && exit 1);
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
args: --timeout=5m
version: latest
# Ref https://github.com/golangci/golangci-lint-action/issues/244
skip-cache: true
build:
name: build
if: github.repository == 'tensorchord/envd'
strategy:
fail-fast: false
matrix:
os: [ ubuntu-24.04, ubuntu-24.04-arm, macos-13, macos-15 ]
runs-on: ${{ matrix.os }}
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Build
run: make
test:
name: test
if: github.repository == 'tensorchord/envd'
env:
# Disable telemetry.
ENVD_ANALYTICS: false
strategy:
fail-fast: false
matrix:
os: [ ubuntu-24.04, ubuntu-24.04-arm ]
runs-on: ${{ matrix.os }}
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Verify mockgen
run: |
make generate && git add pkg &&
git diff --cached --exit-code || (echo 'Please run "make generate" to verify generate' && exit 1);
- name: Test
run: make test
e2e-cli:
name: e2e-cli
if: github.repository == 'tensorchord/envd'
env:
# Disable telemetry.
ENVD_ANALYTICS: false
strategy:
fail-fast: false
matrix:
os: [ ubuntu-24.04, ubuntu-24.04-arm ]
runs-on: ${{ matrix.os }}
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag
- name: e2e test
run: make e2e-cli-test
env:
GIT_LATEST_TAG: ${{ steps.get-latest-tag.outputs.tag }}
e2e-lang:
name: e2e-lang
if: github.repository == 'tensorchord/envd'
env:
# Disable telemetry.
ENVD_ANALYTICS: false
strategy:
fail-fast: false
matrix:
os: [ ubuntu-24.04, ubuntu-24.04-arm ]
runs-on: ${{ matrix.os }}
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag
- name: e2e test
run: make e2e-lang-test
env:
GIT_LATEST_TAG: ${{ steps.get-latest-tag.outputs.tag }}
e2e-doc:
name: e2e-doc
if: github.repository == 'tensorchord/envd'
env:
# Disable telemetry.
ENVD_ANALYTICS: false
strategy:
fail-fast: false
matrix:
os: [ ubuntu-24.04, ubuntu-24.04-arm ]
runs-on: ${{ matrix.os }}
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag
- name: e2e doc test
run: make e2e-doc-test
env:
GIT_LATEST_TAG: ${{ steps.get-latest-tag.outputs.tag }}