4949 - run : make backend
5050 env :
5151 TAGS : bindata
52- - name : run migration tests
53- run : make test-pgsql-migration
5452 - name : run tests
5553 run : make test-pgsql
5654 timeout-minutes : 50
@@ -61,144 +59,6 @@ jobs:
6159 TEST_LDAP : 1
6260 USE_REPO_TEST_DIR : 1
6361
64- test-sqlite :
65- if : needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
66- needs : files-changed
67- runs-on : ubuntu-latest
68- steps :
69- - uses : actions/checkout@v5
70- - uses : actions/setup-go@v6
71- with :
72- go-version-file : go.mod
73- check-latest : true
74- - run : make deps-backend
75- - run : GOEXPERIMENT='' make backend
76- env :
77- TAGS : bindata gogit sqlite sqlite_unlock_notify
78- - name : run migration tests
79- run : make test-sqlite-migration
80- - name : run tests
81- run : GOEXPERIMENT='' make test-sqlite
82- timeout-minutes : 50
83- env :
84- TAGS : bindata gogit sqlite sqlite_unlock_notify
85- RACE_ENABLED : true
86- TEST_TAGS : gogit sqlite sqlite_unlock_notify
87- USE_REPO_TEST_DIR : 1
88-
89- test-unit :
90- if : needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
91- needs : files-changed
92- runs-on : ubuntu-latest
93- services :
94- elasticsearch :
95- image : elasticsearch:7.5.0
96- env :
97- discovery.type : single-node
98- ports :
99- - " 9200:9200"
100- meilisearch :
101- image : getmeili/meilisearch:v1
102- env :
103- MEILI_ENV : development # disable auth
104- ports :
105- - " 7700:7700"
106- redis :
107- image : redis
108- options : >- # wait until redis has started
109- --health-cmd "redis-cli ping"
110- --health-interval 5s
111- --health-timeout 3s
112- --health-retries 10
113- ports :
114- - 6379:6379
115- minio :
116- image : bitnamilegacy/minio:2021.3.17
117- env :
118- MINIO_ACCESS_KEY : 123456
119- MINIO_SECRET_KEY : 12345678
120- ports :
121- - " 9000:9000"
122- devstoreaccount1.azurite.local : # https://github.com/Azure/Azurite/issues/1583
123- image : mcr.microsoft.com/azure-storage/azurite:latest
124- ports :
125- - 10000:10000
126- steps :
127- - uses : actions/checkout@v5
128- - uses : actions/setup-go@v6
129- with :
130- go-version-file : go.mod
131- check-latest : true
132- - name : Add hosts to /etc/hosts
133- run : ' [ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 minio devstoreaccount1.azurite.local mysql elasticsearch meilisearch smtpimap" | sudo tee -a /etc/hosts'
134- - run : make deps-backend
135- - run : make backend
136- env :
137- TAGS : bindata
138- - name : unit-tests
139- run : make unit-test-coverage test-check
140- env :
141- TAGS : bindata
142- RACE_ENABLED : true
143- GITHUB_READ_TOKEN : ${{ secrets.GITHUB_READ_TOKEN }}
144- - name : unit-tests-gogit
145- run : GOEXPERIMENT='' make unit-test-coverage test-check
146- env :
147- TAGS : bindata gogit
148- RACE_ENABLED : true
149- GITHUB_READ_TOKEN : ${{ secrets.GITHUB_READ_TOKEN }}
150-
151- test-mysql :
152- if : needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
153- needs : files-changed
154- runs-on : ubuntu-latest
155- services :
156- mysql :
157- # the bitnami mysql image has more options than the official one, it's easier to customize
158- image : bitnamilegacy/mysql:8.0
159- env :
160- ALLOW_EMPTY_PASSWORD : true
161- MYSQL_DATABASE : testgitea
162- ports :
163- - " 3306:3306"
164- options : >-
165- --mount type=tmpfs,destination=/bitnami/mysql/data
166- elasticsearch :
167- image : elasticsearch:7.5.0
168- env :
169- discovery.type : single-node
170- ports :
171- - " 9200:9200"
172- smtpimap :
173- image : tabascoterrier/docker-imap-devel:latest
174- ports :
175- - " 25:25"
176- - " 143:143"
177- - " 587:587"
178- - " 993:993"
179- steps :
180- - uses : actions/checkout@v5
181- - uses : actions/setup-go@v6
182- with :
183- go-version-file : go.mod
184- check-latest : true
185- - name : Add hosts to /etc/hosts
186- run : ' [ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mysql elasticsearch smtpimap" | sudo tee -a /etc/hosts'
187- - run : make deps-backend
188- - run : make backend
189- env :
190- TAGS : bindata
191- - name : run migration tests
192- run : make test-mysql-migration
193- - name : run tests
194- # run: make integration-test-coverage (at the moment, no coverage is really handled)
195- run : make test-mysql
196- env :
197- TAGS : bindata
198- RACE_ENABLED : true
199- USE_REPO_TEST_DIR : 1
200- TEST_INDEXER_CODE_ES_URL : " http://elastic:changeme@elasticsearch:9200"
201-
20262 test-mssql :
20363 if : needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
20464 needs : files-changed
22888 - run : make backend
22989 env :
23090 TAGS : bindata
231- - run : make test-mssql-migration
23291 - name : run tests
23392 run : make test-mssql
23493 timeout-minutes : 50
0 commit comments