-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (59 loc) · 1.75 KB
/
workflow.yaml
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
name: Test Flow
on:
push:
branches:
- master
paths-ignore:
- '**.md'
- '**_test.go'
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Setup actionflow
uses: xxf098/setup-actionflow@v3
with:
flow-version: 'v0.7.0'
- name: Pre
run: |
rm -rf cue.mod
flow init && flow update
flow do setup
- name: Build
run: |
git clone --branch v0.4.3 --depth 1 https://github.com/cue-lang/cue.git
tee -a ./cue/tools/flow/flow.go << END
func (t *Task) AddDep(path string, dep *Task) {
t.addDep(path, dep)
}
END
tee -a ./cue/tools/flow/cycle.go << ENDD
func CheckCycle(a []*Task) errors.Error {
return checkCycle(a)
}
ENDD
mv ./cue ../
flow do build
- name: Test Funcs
run: |
flow do testFuncs
- name: Test(Reference Cycle)
run: |
mkdir temp1;mv ./cmd/flow ./temp1
cd temp1
./flow init && ./flow update
./flow do mkdir
test -d ./hello
rm *.cue
cp ../testcues/all.cue ./ && ./flow do writeAll && rm *.cue
cp ../testcues/keep.cue ./ && ./flow do keepFile && rm *.cue
cp ../testcues/writefile.cue ./ && ./flow do hello && rm *.cue
cp ../testcues/exec.cue ./ && ./flow do touch && rm *.cue
cp ../testcues/then.cue ./ && ./flow do mkdirWrite && rm *.cue
cp ../workflow.cue ./
./flow do testAll
cp ../workflow.cue ./
./flow do testKeep