2023-05-11 21:21:28 -04:00
|
|
|
name: compliance
|
2023-05-03 22:04:02 -04:00
|
|
|
|
|
|
|
on: [pull_request]
|
|
|
|
|
2023-05-04 18:21:48 -04:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2023-05-03 22:04:02 -04:00
|
|
|
jobs:
|
2023-05-11 21:21:28 -04:00
|
|
|
lint-backend:
|
2023-05-03 22:04:02 -04:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-05-11 21:21:28 -04:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-go@v4
|
2023-05-03 22:04:02 -04:00
|
|
|
with:
|
2023-05-11 21:21:28 -04:00
|
|
|
go-version: ">=1.20"
|
2023-05-06 03:43:56 -04:00
|
|
|
check-latest: true
|
2023-05-11 21:21:28 -04:00
|
|
|
- run: make deps-backend deps-tools
|
|
|
|
- run: make lint-backend
|
2023-05-03 22:04:02 -04:00
|
|
|
env:
|
|
|
|
TAGS: bindata sqlite sqlite_unlock_notify
|
2023-05-11 21:21:28 -04:00
|
|
|
lint-go-windows:
|
2023-05-03 22:04:02 -04:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-05-11 21:21:28 -04:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-go@v4
|
2023-05-03 22:04:02 -04:00
|
|
|
with:
|
2023-05-11 21:21:28 -04:00
|
|
|
go-version: ">=1.20"
|
2023-05-06 03:43:56 -04:00
|
|
|
check-latest: true
|
2023-05-11 21:21:28 -04:00
|
|
|
- run: make deps-backend deps-tools
|
|
|
|
- run: make lint-go-windows lint-go-vet
|
2023-05-03 22:04:02 -04:00
|
|
|
env:
|
|
|
|
TAGS: bindata sqlite sqlite_unlock_notify
|
|
|
|
GOOS: windows
|
|
|
|
GOARCH: amd64
|
2023-05-11 21:21:28 -04:00
|
|
|
lint-go-gogit:
|
2023-05-03 22:04:02 -04:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-05-11 21:21:28 -04:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-go@v4
|
2023-05-03 22:04:02 -04:00
|
|
|
with:
|
2023-05-11 21:21:28 -04:00
|
|
|
go-version: ">=1.20"
|
2023-05-06 03:43:56 -04:00
|
|
|
check-latest: true
|
2023-05-11 21:21:28 -04:00
|
|
|
- run: make deps-backend deps-tools
|
|
|
|
- run: make lint-go
|
2023-05-03 22:04:02 -04:00
|
|
|
env:
|
|
|
|
TAGS: bindata gogit sqlite sqlite_unlock_notify
|
2023-05-11 21:21:28 -04:00
|
|
|
checks-backend:
|
2023-05-03 22:04:02 -04:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-05-11 21:21:28 -04:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-go@v4
|
2023-05-03 22:04:02 -04:00
|
|
|
with:
|
2023-05-11 21:21:28 -04:00
|
|
|
go-version: ">=1.20"
|
2023-05-06 03:43:56 -04:00
|
|
|
check-latest: true
|
2023-05-11 21:21:28 -04:00
|
|
|
- run: make deps-backend deps-tools
|
|
|
|
- run: make --always-make checks-backend # ensure the "go-licenses" make target runs
|
2023-05-03 22:04:02 -04:00
|
|
|
frontend:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-05-11 21:21:28 -04:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
2023-05-03 22:04:02 -04:00
|
|
|
with:
|
2023-05-04 18:21:48 -04:00
|
|
|
node-version: 20
|
2023-05-11 21:21:28 -04:00
|
|
|
- run: make deps-frontend
|
|
|
|
- run: make lint-frontend
|
|
|
|
- run: make checks-frontend
|
2023-05-03 22:04:02 -04:00
|
|
|
backend:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-05-11 21:21:28 -04:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-go@v4
|
2023-05-03 22:04:02 -04:00
|
|
|
with:
|
2023-05-11 21:21:28 -04:00
|
|
|
go-version: ">=1.20"
|
2023-05-06 03:43:56 -04:00
|
|
|
check-latest: true
|
2023-05-11 21:21:28 -04:00
|
|
|
- uses: actions/setup-node@v3
|
2023-05-03 22:04:02 -04:00
|
|
|
with:
|
2023-05-04 18:21:48 -04:00
|
|
|
node-version: 20
|
2023-05-11 21:21:28 -04:00
|
|
|
- run: make deps-backend deps-tools
|
|
|
|
- run: make deps-frontend
|
|
|
|
- run: make frontend
|
|
|
|
- run: go build -o gitea_no_gcc # test if build succeeds without the sqlite tag
|
2023-05-03 22:04:02 -04:00
|
|
|
- name: build-backend-arm64
|
|
|
|
run: make backend # test cross compile
|
|
|
|
env:
|
|
|
|
GOOS: linux
|
|
|
|
GOARCH: arm64
|
|
|
|
TAGS: bindata gogit
|
|
|
|
- name: build-backend-windows
|
|
|
|
run: go build -o gitea_windows
|
|
|
|
env:
|
|
|
|
GOOS: windows
|
|
|
|
GOARCH: amd64
|
|
|
|
TAGS: bindata gogit
|
|
|
|
- name: build-backend-386
|
|
|
|
run: go build -o gitea_linux_386 # test if compatible with 32 bit
|
|
|
|
env:
|
|
|
|
GOOS: linux
|
|
|
|
GOARCH: 386
|