depends_on: [deps-frontend]
- name: lint-backend
- image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
+ image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
pull: always
commands:
- make lint-backend
path: /go
- name: lint-backend-windows
- image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
+ image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
commands:
- make golangci-lint-windows vet
environment:
path: /go
- name: lint-backend-gogit
- image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
+ image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
commands:
- make lint-backend
environment:
path: /go
- name: prepare-test-env
- image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
+ image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
pull: always
commands:
- ./build/test-env-prepare.sh
- name: build
- image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
+ image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
user: gitea
commands:
- ./build/test-env-check.sh
path: /go
- name: test-pgsql
- image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
+ image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
user: gitea
commands:
- timeout -s ABRT 50m make test-pgsql-migration test-pgsql
path: /go
- name: prepare-test-env
- image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
+ image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
pull: always
commands:
- ./build/test-env-prepare.sh
- name: build
- image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
+ image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
user: gitea
commands:
- ./build/test-env-check.sh
path: /go
- name: unit-test
- image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
+ image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
user: gitea
commands:
- make unit-test-coverage test-check
path: /go
- name: unit-test-gogit
- image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
+ image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
user: gitea
commands:
- make unit-test-coverage test-check
path: /go
- name: test-mysql
- image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
+ image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
user: gitea
commands:
- make test-mysql-migration integration-test-coverage
path: /go
- name: prepare-test-env
- image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
+ image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
pull: always
commands:
- ./build/test-env-prepare.sh
- name: build
- image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
+ image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
user: gitea
commands:
- ./build/test-env-check.sh
path: /go
- name: test-mysql8
- image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
+ image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
user: gitea
commands:
- timeout -s ABRT 50m make test-mysql8-migration test-mysql8
path: /go
- name: prepare-test-env
- image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
+ image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
pull: always
commands:
- ./build/test-env-prepare.sh
- name: build
- image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
+ image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
user: gitea
commands:
- ./build/test-env-check.sh
path: /go
- name: test-mssql
- image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
+ image: gitea/test_env:linux-1.20-amd64 # https://gitea.com/gitea/test-env
user: gitea
commands:
- make test-mssql-migration test-mssql
path: /go
- name: prepare-test-env
- image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
+ image: gitea/test_env:linux-1.20-arm64 # https://gitea.com/gitea/test-env
pull: always
commands:
- ./build/test-env-prepare.sh
- name: build
- image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
+ image: gitea/test_env:linux-1.20-arm64 # https://gitea.com/gitea/test-env
user: gitea
commands:
- ./build/test-env-check.sh
path: /go
- name: test-sqlite
- image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env
+ image: gitea/test_env:linux-1.20-arm64 # https://gitea.com/gitea/test-env
user: gitea
commands:
- timeout -s ABRT 50m make test-sqlite-migration test-sqlite
once sync.Once
cache *lru.TwoQueueCache
+
+ githubStyles = styles.Get("github")
)
// NewContext loads custom highlight map from local config
return code
}
// style not used for live site but need to pass something
- err = formatter.Format(htmlw, styles.GitHub, iterator)
+ err = formatter.Format(htmlw, githubStyles, iterator)
if err != nil {
log.Error("Can't format code: %v", err)
return code
lines := make([]string, 0, len(tokensLines))
for _, tokens := range tokensLines {
iterator = chroma.Literator(tokens...)
- err = formatter.Format(htmlBuf, styles.GitHub, iterator)
+ err = formatter.Format(htmlBuf, githubStyles, iterator)
if err != nil {
return nil, "", fmt.Errorf("can't format code: %w", err)
}