This repository was archived by the owner on Jul 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathci.cue
More file actions
83 lines (75 loc) · 1.33 KB
/
ci.cue
File metadata and controls
83 lines (75 loc) · 1.33 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
package todoapp
import (
"dagger.io/dagger"
"universe.dagger.io/alpine"
"universe.dagger.io/bash"
"universe.dagger.io/docker"
)
dagger.#Plan & {
client: {
filesystem: {
"./": read: {
contents: dagger.#FS
exclude: [
"README.md",
"_build",
"dagger.cue",
"node_modules",
]
}
//"./_build": write: contents: actions.build.contents.output
}
}
actions: {
deps: docker.#Build & {
steps: [
alpine.#Build & {
packages: {
bash: {}
//we do not need npm for build, but it's required for test
npm: {}
git: {}
}
},
docker.#Copy & {
contents: client.filesystem."./".read.contents
dest: "/src"
},
bash.#Run & {
workdir: "/src"
script: contents: #"""
npm i -g pnpm && pnpm i
"""#
}
]
}
"code-style": bash.#Run & {
input: deps.output
workdir: "/src"
script: contents: #"""
yarn format:check
"""#
}
build: bash.#Run & {
input: deps.output
workdir: "/src"
script: contents: #"""
pnpm build
"""#
}
test: bash.#Run & {
input: build.output
workdir: "/src"
script: contents: #"""
pnpm test
"""#
}
"canary-release": bash.#Run & {
input: build.output
workdir: "/src"
script: contents: #"""
pnpm release:canary ---publish
"""#
}
}
}