@@ -11,55 +11,79 @@ jobs:
1111 files-changed :
1212 uses : ./.github/workflows/files-changed.yml
1313
14- test-pgsql :
14+ test-mssql1 :
1515 if : needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
1616 needs : files-changed
1717 runs-on : ubuntu-latest
1818 services :
19- pgsql :
20- image : postgres:14
19+ mssql :
20+ image : mcr.microsoft.com/mssql/server:2019-latest
2121 env :
22- POSTGRES_DB : test
23- POSTGRES_PASSWORD : postgres
22+ ACCEPT_EULA : Y
23+ MSSQL_PID : Standard
24+ SA_PASSWORD : MwantsaSecurePassword1
2425 ports :
25- - " 5432:5432 "
26- ldap :
27- image : gitea/test-openldap :latest
26+ - " 1433:1433 "
27+ devstoreaccount1.azurite.local : # https://github.com/Azure/Azurite/issues/1583
28+ image : mcr.microsoft.com/azure-storage/azurite :latest
2829 ports :
29- - " 389:389"
30- - " 636:636"
31- minio :
32- # as github actions doesn't support "entrypoint", we need to use a non-official image
33- # that has a custom entrypoint set to "minio server /data"
34- image : bitnamilegacy/minio:2023.8.31
30+ - 10000:10000
31+ steps :
32+ - uses : actions/checkout@v5
33+ - uses : actions/setup-go@v6
34+ with :
35+ go-version-file : go.mod
36+ check-latest : true
37+ - name : Add hosts to /etc/hosts
38+ run : ' [ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mssql devstoreaccount1.azurite.local" | sudo tee -a /etc/hosts'
39+ - run : make deps-backend
40+ - run : make backend
3541 env :
36- MINIO_ROOT_USER : 123456
37- MINIO_ROOT_PASSWORD : 12345678
42+ TAGS : bindata
43+ - name : run tests
44+ run : make test-mssql
45+ timeout-minutes : 50
46+ env :
47+ TAGS : bindata
48+ USE_REPO_TEST_DIR : 1
49+
50+ test-mssql2 :
51+ if : needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
52+ needs : files-changed
53+ runs-on : ubuntu-latest
54+ services :
55+ mssql :
56+ image : mcr.microsoft.com/mssql/server:2019-latest
57+ env :
58+ ACCEPT_EULA : Y
59+ MSSQL_PID : Standard
60+ SA_PASSWORD : MwantsaSecurePassword1
3861 ports :
39- - " 9000:9000"
62+ - " 1433:1433"
63+ devstoreaccount1.azurite.local : # https://github.com/Azure/Azurite/issues/1583
64+ image : mcr.microsoft.com/azure-storage/azurite:latest
65+ ports :
66+ - 10000:10000
4067 steps :
4168 - uses : actions/checkout@v5
4269 - uses : actions/setup-go@v6
4370 with :
4471 go-version-file : go.mod
4572 check-latest : true
4673 - name : Add hosts to /etc/hosts
47- run : ' [ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 pgsql ldap minio " | sudo tee -a /etc/hosts'
74+ run : ' [ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mssql devstoreaccount1.azurite.local " | sudo tee -a /etc/hosts'
4875 - run : make deps-backend
4976 - run : make backend
5077 env :
5178 TAGS : bindata
5279 - name : run tests
53- run : make test-pgsql
80+ run : make test-mssql
5481 timeout-minutes : 50
5582 env :
56- TAGS : bindata gogit
57- RACE_ENABLED : true
58- TEST_TAGS : gogit
59- TEST_LDAP : 1
83+ TAGS : bindata
6084 USE_REPO_TEST_DIR : 1
6185
62- test-mssql :
86+ test-mssql3 :
6387 if : needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
6488 needs : files-changed
6589 runs-on : ubuntu-latest
0 commit comments