-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (48 loc) · 1.34 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
name: Go
on:
push:
#pull_request:
# types:
# - opened
# - synchronize
# - reopened
jobs:
lint:
runs-on: ubuntu-22.04
container:
image: lomorage/lomo-backup:1.0
env:
PATH: /bin:/usr/bin:/usr/local/bin:/usr/local/go/bin
GOFLAGS: "-buildvcs=false"
steps:
- uses: actions/checkout@v4
- run: make lint
unit-test:
runs-on: ubuntu-22.04
container:
image: lomorage/lomo-backup:1.0
env:
PATH: /bin:/usr/bin:/usr/local/bin:/usr/local/go/bin
GOBIN: /usr/local/bin
GOFLAGS: "-buildvcs=false"
steps:
- uses: actions/checkout@v4
- run: make unit-tests
e2e-test:
runs-on: ubuntu-22.04
container:
image: lomorage/lomo-backup:1.0
env:
PATH: /bin:/usr/bin:/usr/local/bin:/usr/local/go/bin
GOBIN: /usr/local/bin
GOFLAGS: "-buildvcs=false"
WORKDIR: /go/src/github.com/lomorage/lomo-backup
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- run: cd test/data; find . | while read -r file; do git log -1 --format="%ad" --date=iso "$file" | xargs -t -I{} touch -d {} "$file"; done
- run: mkdir -p $WORKDIR; rsync -avz * $WORKDIR/; cd $WORKDIR; tree --si -D test/data/
- run: cd $WORKDIR; make install
- run: cd $WORKDIR; make e2e-tests