-
Notifications
You must be signed in to change notification settings - Fork 20
98 lines (84 loc) · 2.75 KB
/
nightly-test.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
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
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
# Nightly Test Against Open Source Projects Using Xgo
name: Nightly Test
on:
schedule:
- cron: "23 0 * * *"
push:
branches: [ "trigger-nightly-test" ]
workflow_dispatch:
inputs:
dummy:
default: nothing
# 'gin-gonic/gin' ok
# 'fatedier/frp' cannot pass even with go? need to verify
#
# NOTE: use serially job to avoid 'Job Cancelled' which could
# possible be due to memory exhaust
jobs:
test-with-xgo:
runs-on: ubuntu-latest
timeout-minutes: 360
steps:
- uses: actions/checkout@v4
with:
path: xgo
- name: Switch To Master If From Nightly-Test
run: |
cd xgo
cur_branch=$(git branch --show-current)
if [[ $cur_branch = trigger-nightly-test ]];then
git fetch --depth=1 origin master
git checkout master
fi
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
- name: Install Xgo Locally
run: |
cd xgo
go install ./cmd/xgo
xgo exec --reset-instrument --log-debug go version
xgo revision
- uses: actions/checkout@v4
with:
repository: pocketbase/pocketbase
path: pocketbase/pocketbase
- name: Test pocketbase/pocketbase
continue-on-error: true
run: |
cd pocketbase/pocketbase
xgo test -v ./...
echo $? > test-exit-code.txt
echo "exit code is $(cat test-exit-code.txt)"
- uses: actions/checkout@v4
with:
repository: gohugoio/hugo
path: gohugoio/hugo
- name: Test gohugoio/hugo
continue-on-error: true
run: |
cd gohugoio/hugo
xgo test -v ./...
echo $? > test-exit-code.txt
echo "exit code is $?"
echo "exit code is $(cat test-exit-code.txt)"
- uses: actions/checkout@v4
with:
repository: kubernetes/kubernetes
path: kubernetes/kubernetes
- name: Test kubernetes/kubernetes
continue-on-error: true
run: |
cd kubernetes/kubernetes
xgo test -v ./...
echo $? > test-exit-code.txt
echo "exit code is $(cat test-exit-code.txt)"
- name: Summary
run: |
echo "exit code:"
echo " pocketbase/pocketbase: $(cat pocketbase/pocketbase/test-exit-code.txt)"
echo " gohugoio/hugo: $(cat gohugoio/hugo/test-exit-code.txt)"
echo " kubernetes/kubernetes: $(cat kubernetes/kubernetes/test-exit-code.txt)"