From 5af3efd13b4d0ee48a46137d853936b794fadc39 Mon Sep 17 00:00:00 2001 From: silverwind Date: Tue, 9 May 2023 22:22:49 +0200 Subject: [PATCH 01/14] Actions cleanups - Remove actions name where command is descriptive enough - Use kebab-case instead of snake-case for step names - Use shorter job names because to make PR checks more readable --- .github/workflows/cron-licenses.yml | 5 +- .github/workflows/cron-translations.yml | 10 +-- .github/workflows/lock.yml | 2 +- .github/workflows/pull-compliance.yml | 74 ++++++------------ .github/workflows/pull-compliance_docs.yml | 14 ++-- .github/workflows/pull-db_test.yml | 90 ++++++++-------------- .github/workflows/pull-docker_dryrun.yml | 13 ++-- .github/workflows/pull-e2e.yml | 13 ++-- .github/workflows/push-publish_docs.yml | 8 +- 9 files changed, 83 insertions(+), 146 deletions(-) diff --git a/.github/workflows/cron-licenses.yml b/.github/workflows/cron-licenses.yml index 7239078710486..2d2332cc50f90 100644 --- a/.github/workflows/cron-licenses.yml +++ b/.github/workflows/cron-licenses.yml @@ -6,11 +6,10 @@ on: - cron: "7 0 * * 1" jobs: - cron: + cron-licenses: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 + - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: go-version: '>=1.20.1' diff --git a/.github/workflows/cron-translations.yml b/.github/workflows/cron-translations.yml index c83450d2e6612..91e2a66b0eab2 100644 --- a/.github/workflows/cron-translations.yml +++ b/.github/workflows/cron-translations.yml @@ -5,11 +5,10 @@ on: - cron: "7 0 * * *" # every day at 0:07 UTC jobs: - crowdin_pull: + crowdin-pull: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 + - uses: actions/checkout@v3 - name: download from crowdin uses: docker://jonasfranz/crowdin env: @@ -30,11 +29,10 @@ jobs: commit_message: "[skip ci] Updated translations via Crowdin" remote: "git@github.com:go-gitea/gitea.git" ssh_key: ${{ secrets.DEPLOY_KEY }} - crowdin_push: + crowdin-push: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 + - uses: actions/checkout@v3 - name: push translations to crowdin uses: docker://jonasfranz/crowdin env: diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index 2e132b95fed8a..aa9c0503a9d73 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -1,4 +1,4 @@ -name: 'Lock Threads' +name: Lock Threads on: schedule: diff --git a/.github/workflows/pull-compliance.yml b/.github/workflows/pull-compliance.yml index 155d9298e9607..bd63b2cadd04b 100644 --- a/.github/workflows/pull-compliance.yml +++ b/.github/workflows/pull-compliance.yml @@ -1,4 +1,4 @@ -name: "Pull: Compliance Tests" +name: Compliance on: [pull_request] @@ -7,13 +7,11 @@ concurrency: cancel-in-progress: true jobs: - lint_basic: + lint-backend: runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v3 - - name: setup go - uses: actions/setup-go@v4 + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 with: go-version: '>=1.20' check-latest: true @@ -25,13 +23,11 @@ jobs: GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not GOSUMDB: sum.golang.org TAGS: bindata sqlite sqlite_unlock_notify - lint_windows: + lint-backend-windows: runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v3 - - name: setup go - uses: actions/setup-go@v4 + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 with: go-version: '>=1.20' check-latest: true @@ -45,13 +41,11 @@ jobs: TAGS: bindata sqlite sqlite_unlock_notify GOOS: windows GOARCH: amd64 - lint_gogit: + lint-backup-gogit: runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v3 - - name: setup go - uses: actions/setup-go@v4 + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 with: go-version: '>=1.20' check-latest: true @@ -63,15 +57,11 @@ jobs: GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not GOSUMDB: sum.golang.org TAGS: bindata gogit sqlite sqlite_unlock_notify - - name: checks backend - run: make --always-make checks-backend # ensure the 'go-licenses' make target runs - check_backend: + checks-backend: runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v3 - - name: setup go - uses: actions/setup-go@v4 + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 with: go-version: '>=1.20' check-latest: true @@ -82,42 +72,28 @@ jobs: frontend: runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v3 - - name: setup node - uses: actions/setup-node@v3 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: 20 - - name: deps-frontend - run: make deps-frontend - - name: lint frontend - run: make lint-frontend - - name: checks frontend - run: make checks-frontend - - name: test frontend - run: make test-frontend + - run: make deps-frontend + - run: make lint-frontend + - run: make checks-frontend backend: runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v3 - - name: setup go - uses: actions/setup-go@v4 + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 with: go-version: '>=1.20' check-latest: true - - name: setup node - uses: actions/setup-node@v3 + - uses: actions/setup-node@v3 with: node-version: 20 - - name: deps-backend - run: make deps-backend deps-tools - - name: deps-frontend - run: make deps-frontend - - name: build frontend - run: make frontend - - name: build-backend-no-gcc - run: go build -o gitea_no_gcc # test if build succeeds without the sqlite tag + - 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 env: GOPROXY: https://goproxy.io - name: build-backend-arm64 diff --git a/.github/workflows/pull-compliance_docs.yml b/.github/workflows/pull-compliance_docs.yml index c033b62711dfa..effdfc74f3785 100644 --- a/.github/workflows/pull-compliance_docs.yml +++ b/.github/workflows/pull-compliance_docs.yml @@ -1,4 +1,4 @@ -name: "Pull: Compliance testing for documentation" +name: Compliance Docs on: pull_request: @@ -14,13 +14,9 @@ jobs: compliance-docs: runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v3 - - name: setup node - uses: actions/setup-node@v3 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: 20 - - name: install dependencies - run: make deps-frontend - - name: lint markdown - run: make lint-md + - run: make deps-frontend + - run: make lint-md diff --git a/.github/workflows/pull-db_test.yml b/.github/workflows/pull-db_test.yml index ce97bfcb2c0f8..c619bdeb269d9 100644 --- a/.github/workflows/pull-db_test.yml +++ b/.github/workflows/pull-db_test.yml @@ -1,4 +1,4 @@ -name: "Pull: Database Tests" +name: Database Tests on: [pull_request] @@ -8,7 +8,7 @@ concurrency: jobs: # PostgreSQL Tests - db_pgsql_test: + test-pgsql: runs-on: ubuntu-latest services: pgsql: @@ -33,18 +33,14 @@ jobs: ports: - "9000:9000" steps: - - name: checkout - uses: actions/checkout@v3 - - name: setup go - uses: actions/setup-go@v4 + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 with: go-version: '>=1.20.0' - name: Add hosts to /etc/hosts run: echo "127.0.0.1 pgsql ldap minio" | sudo tee -a /etc/hosts - - name: install dependencies - run: make deps-backend - - name: build - run: make backend + - run: make deps-backend + - run: make backend env: GOPROXY: https://goproxy.io GOSUMDB: sum.golang.org @@ -60,19 +56,15 @@ jobs: USE_REPO_TEST_DIR: 1 # SQLite Tests - db_sqlite_test: + test-sqlite: runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v3 - - name: setup go - uses: actions/setup-go@v4 + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 with: go-version: '>=1.20.0' - - name: install dependencies - run: make deps-backend - - name: build - run: make backend + - run: make deps-backend + - run: make backend env: GOPROXY: https://goproxy.io GOSUMDB: sum.golang.org @@ -87,7 +79,7 @@ jobs: USE_REPO_TEST_DIR: 1 # Unit Tests - db_unit_tests: + test-unit: runs-on: ubuntu-latest services: mysql: @@ -111,30 +103,26 @@ jobs: - "587:587" - "993:993" steps: - - name: checkout - uses: actions/checkout@v3 - - name: setup go - uses: actions/setup-go@v4 + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 with: go-version: '>=1.20.0' - name: Add hosts to /etc/hosts run: echo "127.0.0.1 mysql elasticsearch smtpimap" | sudo tee -a /etc/hosts - - name: install dependencies - run: make deps-backend - - name: build - run: make backend + - run: make deps-backend + - run: make backend env: GOPROXY: https://goproxy.io GOSUMDB: sum.golang.org TAGS: bindata - - name: unit tests + - name: unit-tests run: make unit-test-coverage test-check env: GOPROXY: https://goproxy.io TAGS: bindata RACE_ENABLED: true GITHUB_READ_TOKEN: ${{ secrets.GITHUB_READ_TOKEN }} - - name: unit tests (gogit) + - name: unit-tests-gogit run: make unit-test-coverage test-check env: GOPROXY: https://goproxy.io @@ -143,7 +131,7 @@ jobs: GITHUB_READ_TOKEN: ${{ secrets.GITHUB_READ_TOKEN }} # MySQL Tests - db_mysql_test: + test-mysql5: runs-on: ubuntu-latest services: mysql: @@ -167,18 +155,14 @@ jobs: - "587:587" - "993:993" steps: - - name: checkout - uses: actions/checkout@v3 - - name: setup go - uses: actions/setup-go@v4 + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 with: go-version: '>=1.20.0' - name: Add hosts to /etc/hosts run: echo "127.0.0.1 mysql elasticsearch smtpimap" | sudo tee -a /etc/hosts - - name: install dependencies - run: make deps-backend - - name: build - run: make backend + - run: make deps-backend + - run: make backend env: GOPROXY: https://goproxy.io GOSUMDB: sum.golang.org @@ -193,7 +177,7 @@ jobs: TEST_INDEXER_CODE_ES_URL: "http://elastic:changeme@elasticsearch:9200" # MySQL8 Tests - db_mysql8_test: + test-mysql8: runs-on: ubuntu-latest services: mysql8: @@ -204,18 +188,14 @@ jobs: ports: - "3306:3306" steps: - - name: checkout - uses: actions/checkout@v3 - - name: setup go - uses: actions/setup-go@v4 + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 with: go-version: '>=1.20.0' - name: Add hosts to /etc/hosts run: echo "127.0.0.1 mysql8" | sudo tee -a /etc/hosts - - name: install dependencies - run: make deps-backend - - name: build - run: make backend + - run: make deps-backend + - run: make backend env: GOPROXY: https://goproxy.io GOSUMDB: sum.golang.org @@ -228,7 +208,7 @@ jobs: USE_REPO_TEST_DIR: 1 # MSSQL Tests - db_mssql_test: + test-mssql: runs-on: ubuntu-latest services: mssql: @@ -240,18 +220,14 @@ jobs: ports: - "1433:1433" steps: - - name: checkout - uses: actions/checkout@v3 - - name: setup go - uses: actions/setup-go@v4 + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 with: go-version: '>=1.20.0' - name: Add hosts to /etc/hosts run: echo "127.0.0.1 mssql" | sudo tee -a /etc/hosts - - name: install dependencies - run: make deps-backend - - name: build - run: make backend + - run: make deps-backend + - run: make backend env: GOPROXY: https://goproxy.io GOSUMDB: sum.golang.org diff --git a/.github/workflows/pull-docker_dryrun.yml b/.github/workflows/pull-docker_dryrun.yml index f17d6014b6068..e5453713117f1 100644 --- a/.github/workflows/pull-docker_dryrun.yml +++ b/.github/workflows/pull-docker_dryrun.yml @@ -1,4 +1,4 @@ -name: "Pull: Docker Dry Run" +name: Docker Dry Run on: [pull_request] @@ -7,15 +7,12 @@ concurrency: cancel-in-progress: true jobs: - docker_dryrun: + docker-dryrun: runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build and push - uses: docker/build-push-action@v4 + - uses: actions/checkout@v3 + - uses: docker/setup-buildx-action@v2 + - uses: docker/build-push-action@v4 with: push: false tags: gitea/gitea:linux-amd64 diff --git a/.github/workflows/pull-e2e.yml b/.github/workflows/pull-e2e.yml index 79c54175080f3..86c4ab0d1ce30 100644 --- a/.github/workflows/pull-e2e.yml +++ b/.github/workflows/pull-e2e.yml @@ -1,4 +1,4 @@ -name: "Pull: E2E Tests" +name: E2E Tests on: [pull_request] @@ -7,18 +7,15 @@ concurrency: cancel-in-progress: true jobs: - e2e_tests: + test-e2e: runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v3 - - name: setup go - uses: actions/setup-go@v4 + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 with: go-version: '>=1.20' check-latest: true - - name: setup node - uses: actions/setup-node@v3 + - uses: actions/setup-node@v3 with: node-version: 20 - name: build diff --git a/.github/workflows/push-publish_docs.yml b/.github/workflows/push-publish_docs.yml index 9037e278ca118..0ef84c22ea985 100644 --- a/.github/workflows/push-publish_docs.yml +++ b/.github/workflows/push-publish_docs.yml @@ -1,4 +1,4 @@ -name: "Docs: Publish" +name: Publish on: push: @@ -11,10 +11,8 @@ jobs: compliance-docs: runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v3 - - name: setup go - uses: actions/setup-go@v4 + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 with: go-version: '>=1.20.1' - name: build docs From 351cf2cb6fa308e0158ba215161237334f23eb03 Mon Sep 17 00:00:00 2001 From: silverwind Date: Thu, 11 May 2023 19:27:17 +0200 Subject: [PATCH 02/14] rename non-default lint targets to lint-go-* --- .github/workflows/pull-compliance.yml | 10 +++++----- Makefile | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pull-compliance.yml b/.github/workflows/pull-compliance.yml index bd63b2cadd04b..eda3a8be5bf2e 100644 --- a/.github/workflows/pull-compliance.yml +++ b/.github/workflows/pull-compliance.yml @@ -23,7 +23,7 @@ jobs: GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not GOSUMDB: sum.golang.org TAGS: bindata sqlite sqlite_unlock_notify - lint-backend-windows: + lint-go-windows: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -33,7 +33,7 @@ jobs: check-latest: true - name: deps-backend run: make deps-backend deps-tools - - name: lint-backend-windows + - name: lint-go-windows run: make lint-go-windows lint-go-vet env: GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not @@ -41,7 +41,7 @@ jobs: TAGS: bindata sqlite sqlite_unlock_notify GOOS: windows GOARCH: amd64 - lint-backup-gogit: + lint-go-gogit: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -51,8 +51,8 @@ jobs: check-latest: true - name: deps-backend run: make deps-backend deps-tools - - name: lint-backend-gogit - run: make lint-backend + - name: lint-go-gogit + run: make lint-go env: GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not GOSUMDB: sum.golang.org diff --git a/Makefile b/Makefile index 6a03875b793d5..3c44e65dfa9f2 100644 --- a/Makefile +++ b/Makefile @@ -394,7 +394,7 @@ lint-go: lint-go-fix: $(GO) run $(GOLANGCI_LINT_PACKAGE) run --fix -# workaround step for the lint-backend-windows CI task because 'go run' can not +# workaround step for the lint-go-windows CI task because 'go run' can not # have distinct GOOS/GOARCH for its build and run steps .PHONY: lint-go-windows lint-go-windows: From 44829f01930d626bfab8d65677f2df8886d61c36 Mon Sep 17 00:00:00 2001 From: silverwind Date: Thu, 11 May 2023 19:31:22 +0200 Subject: [PATCH 03/14] remove more names, rename lock to cron-lock --- .github/workflows/cron-licenses.yml | 3 +-- .github/workflows/{lock.yml => cron-lock.yml} | 2 +- .github/workflows/pull-compliance.yml | 24 +++++++------------ .github/workflows/pull-e2e.yml | 6 ++--- 4 files changed, 12 insertions(+), 23 deletions(-) rename .github/workflows/{lock.yml => cron-lock.yml} (87%) diff --git a/.github/workflows/cron-licenses.yml b/.github/workflows/cron-licenses.yml index 2d2332cc50f90..2078e194007a1 100644 --- a/.github/workflows/cron-licenses.yml +++ b/.github/workflows/cron-licenses.yml @@ -2,8 +2,7 @@ name: "Cron: Update licenses and gitignores" on: schedule: - # weekly on Monday at 0:07 UTC - - cron: "7 0 * * 1" + - cron: "7 0 * * 1" # weekly on Monday at 0:07 UTC jobs: cron-licenses: diff --git a/.github/workflows/lock.yml b/.github/workflows/cron-lock.yml similarity index 87% rename from .github/workflows/lock.yml rename to .github/workflows/cron-lock.yml index aa9c0503a9d73..af583d14c41f2 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/cron-lock.yml @@ -2,7 +2,7 @@ name: Lock Threads on: schedule: - - cron: '0 0 * * *' # Run once a day + - cron: '0 0 * * *' # Once a day workflow_dispatch: permissions: diff --git a/.github/workflows/pull-compliance.yml b/.github/workflows/pull-compliance.yml index eda3a8be5bf2e..147572e5d22a1 100644 --- a/.github/workflows/pull-compliance.yml +++ b/.github/workflows/pull-compliance.yml @@ -15,10 +15,8 @@ jobs: with: go-version: '>=1.20' check-latest: true - - name: deps-backend - run: make deps-backend deps-tools - - name: lint backend - run: make lint-backend + - run: make deps-backend deps-tools + - run: make lint-backend env: GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not GOSUMDB: sum.golang.org @@ -31,10 +29,8 @@ jobs: with: go-version: '>=1.20' check-latest: true - - name: deps-backend - run: make deps-backend deps-tools - - name: lint-go-windows - run: make lint-go-windows lint-go-vet + - run: make deps-backend deps-tools + - run: make lint-go-windows lint-go-vet env: GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not GOSUMDB: sum.golang.org @@ -49,10 +45,8 @@ jobs: with: go-version: '>=1.20' check-latest: true - - name: deps-backend - run: make deps-backend deps-tools - - name: lint-go-gogit - run: make lint-go + - run: make deps-backend deps-tools + - run: make lint-go env: GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not GOSUMDB: sum.golang.org @@ -65,10 +59,8 @@ jobs: with: go-version: '>=1.20' check-latest: true - - name: deps-backend - run: make deps-backend deps-tools - - name: checks backend - run: make --always-make checks-backend # ensure the 'go-licenses' make target runs + - run: make deps-backend deps-tools + - run: make --always-make checks-backend # ensure the 'go-licenses' make target runs frontend: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/pull-e2e.yml b/.github/workflows/pull-e2e.yml index 86c4ab0d1ce30..fcb01c6c64c8f 100644 --- a/.github/workflows/pull-e2e.yml +++ b/.github/workflows/pull-e2e.yml @@ -18,10 +18,8 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 20 - - name: build - run: make deps-frontend frontend deps-backend - - name: Install playwright browsers - run: npx playwright install --with-deps + - run: make deps-frontend frontend deps-backend + - run: npx playwright install --with-deps - name: run tests run: timeout -s ABRT 40m make test-e2e-sqlite env: From 6e55a51f297b52a204b64ecefe4c9031f7258f95 Mon Sep 17 00:00:00 2001 From: silverwind Date: Thu, 11 May 2023 19:33:19 +0200 Subject: [PATCH 04/14] remove GOPROXY and GOSUMDB --- .github/workflows/pull-compliance.yml | 11 ----------- .github/workflows/pull-db_test.yml | 19 ------------------- .github/workflows/pull-docker_dryrun.yml | 2 -- .github/workflows/pull-e2e.yml | 2 -- 4 files changed, 34 deletions(-) diff --git a/.github/workflows/pull-compliance.yml b/.github/workflows/pull-compliance.yml index 147572e5d22a1..41fe1af78e3c5 100644 --- a/.github/workflows/pull-compliance.yml +++ b/.github/workflows/pull-compliance.yml @@ -18,8 +18,6 @@ jobs: - run: make deps-backend deps-tools - run: make lint-backend env: - GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not - GOSUMDB: sum.golang.org TAGS: bindata sqlite sqlite_unlock_notify lint-go-windows: runs-on: ubuntu-latest @@ -32,8 +30,6 @@ jobs: - run: make deps-backend deps-tools - run: make lint-go-windows lint-go-vet env: - GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not - GOSUMDB: sum.golang.org TAGS: bindata sqlite sqlite_unlock_notify GOOS: windows GOARCH: amd64 @@ -48,8 +44,6 @@ jobs: - run: make deps-backend deps-tools - run: make lint-go env: - GOPROXY: https://goproxy.io # proxy.golang.org is blocked in China, this proxy is not - GOSUMDB: sum.golang.org TAGS: bindata gogit sqlite sqlite_unlock_notify checks-backend: runs-on: ubuntu-latest @@ -86,25 +80,20 @@ jobs: - run: make deps-frontend - run: make frontend - run: go build -o gitea_no_gcc # test if build succeeds without the sqlite tag - env: - GOPROXY: https://goproxy.io - name: build-backend-arm64 run: make backend # test cross compile env: - GOPROXY: https://goproxy.io GOOS: linux GOARCH: arm64 TAGS: bindata gogit - name: build-backend-windows run: go build -o gitea_windows env: - GOPROXY: https://goproxy.io 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: - GOPROXY: https://goproxy.io GOOS: linux GOARCH: 386 diff --git a/.github/workflows/pull-db_test.yml b/.github/workflows/pull-db_test.yml index 855ef0b192f6d..3f4205fc51ed8 100644 --- a/.github/workflows/pull-db_test.yml +++ b/.github/workflows/pull-db_test.yml @@ -42,13 +42,10 @@ jobs: - run: make deps-backend - run: make backend env: - GOPROXY: https://goproxy.io - GOSUMDB: sum.golang.org TAGS: bindata - name: run tests run: timeout -s ABRT 50m make test-pgsql-migration test-pgsql env: - GOPROXY: https://goproxy.io TAGS: bindata gogit RACE_ENABLED: true TEST_TAGS: gogit @@ -66,13 +63,10 @@ jobs: - run: make deps-backend - run: make backend env: - GOPROXY: https://goproxy.io - GOSUMDB: sum.golang.org TAGS: bindata gogit sqlite sqlite_unlock_notify - name: run tests run: timeout -s ABRT 50m make test-sqlite-migration test-sqlite env: - GOPROXY: https://goproxy.io TAGS: bindata gogit sqlite sqlite_unlock_notify RACE_ENABLED: true TEST_TAGS: gogit sqlite sqlite_unlock_notify @@ -122,20 +116,16 @@ jobs: - run: make deps-backend - run: make backend env: - GOPROXY: https://goproxy.io - GOSUMDB: sum.golang.org TAGS: bindata - name: unit-tests run: make unit-test-coverage test-check env: - GOPROXY: https://goproxy.io TAGS: bindata RACE_ENABLED: true GITHUB_READ_TOKEN: ${{ secrets.GITHUB_READ_TOKEN }} - name: unit-tests-gogit run: make unit-test-coverage test-check env: - GOPROXY: https://goproxy.io TAGS: bindata gogit RACE_ENABLED: true GITHUB_READ_TOKEN: ${{ secrets.GITHUB_READ_TOKEN }} @@ -174,13 +164,10 @@ jobs: - run: make deps-backend - run: make backend env: - GOPROXY: https://goproxy.io - GOSUMDB: sum.golang.org TAGS: bindata - name: run tests run: make test-mysql-migration integration-test-coverage env: - GOPROXY: https://goproxy.io TAGS: bindata RACE_ENABLED: true USE_REPO_TEST_DIR: 1 @@ -207,13 +194,10 @@ jobs: - run: make deps-backend - run: make backend env: - GOPROXY: https://goproxy.io - GOSUMDB: sum.golang.org TAGS: bindata - name: run tests run: timeout -s ABRT 50m make test-mysql8-migration test-mysql8 env: - GOPROXY: https://goproxy.io TAGS: bindata USE_REPO_TEST_DIR: 1 @@ -239,12 +223,9 @@ jobs: - run: make deps-backend - run: make backend env: - GOPROXY: https://goproxy.io - GOSUMDB: sum.golang.org TAGS: bindata - name: run tests run: timeout -s ABRT 50m make test-mssql-migration test-mssql env: - GOPROXY: https://goproxy.io TAGS: bindata USE_REPO_TEST_DIR: 1 diff --git a/.github/workflows/pull-docker_dryrun.yml b/.github/workflows/pull-docker_dryrun.yml index e5453713117f1..d96f315fccaa6 100644 --- a/.github/workflows/pull-docker_dryrun.yml +++ b/.github/workflows/pull-docker_dryrun.yml @@ -16,5 +16,3 @@ jobs: with: push: false tags: gitea/gitea:linux-amd64 - build-args: | - GOPROXY=https://goproxy.io diff --git a/.github/workflows/pull-e2e.yml b/.github/workflows/pull-e2e.yml index fcb01c6c64c8f..d1bf09e14e446 100644 --- a/.github/workflows/pull-e2e.yml +++ b/.github/workflows/pull-e2e.yml @@ -23,6 +23,4 @@ jobs: - name: run tests run: timeout -s ABRT 40m make test-e2e-sqlite env: - GOPROXY: https://goproxy.io - GOSUMDB: sum.golang.org USE_REPO_TEST_DIR: 1 From 50082df5ab22d4ff8059c4225305fe3d0be0c18f Mon Sep 17 00:00:00 2001 From: silverwind Date: Thu, 11 May 2023 19:37:49 +0200 Subject: [PATCH 05/14] rename files, remove workflow names --- .../workflows/{pull-compliance_docs.yml => compliance-docs.yml} | 2 -- .github/workflows/{pull-compliance.yml => compliance.yml} | 2 -- .github/workflows/cron-licenses.yml | 2 -- .github/workflows/cron-lock.yml | 2 -- .github/workflows/cron-translations.yml | 2 -- .github/workflows/{pull-db_test.yml => db-tests.yml} | 2 -- .github/workflows/{pull-docker_dryrun.yml => docker-dryrun.yml} | 2 -- .github/workflows/{pull-e2e.yml => e2e-tests.yml} | 2 -- .github/workflows/{push-publish_docs.yml => publish-docs.yml} | 2 -- 9 files changed, 18 deletions(-) rename .github/workflows/{pull-compliance_docs.yml => compliance-docs.yml} (94%) rename .github/workflows/{pull-compliance.yml => compliance.yml} (99%) rename .github/workflows/{pull-db_test.yml => db-tests.yml} (99%) rename .github/workflows/{pull-docker_dryrun.yml => docker-dryrun.yml} (94%) rename .github/workflows/{pull-e2e.yml => e2e-tests.yml} (97%) rename .github/workflows/{push-publish_docs.yml => publish-docs.yml} (97%) diff --git a/.github/workflows/pull-compliance_docs.yml b/.github/workflows/compliance-docs.yml similarity index 94% rename from .github/workflows/pull-compliance_docs.yml rename to .github/workflows/compliance-docs.yml index effdfc74f3785..651e14979aaec 100644 --- a/.github/workflows/pull-compliance_docs.yml +++ b/.github/workflows/compliance-docs.yml @@ -1,5 +1,3 @@ -name: Compliance Docs - on: pull_request: paths: diff --git a/.github/workflows/pull-compliance.yml b/.github/workflows/compliance.yml similarity index 99% rename from .github/workflows/pull-compliance.yml rename to .github/workflows/compliance.yml index 41fe1af78e3c5..214a05e7e64eb 100644 --- a/.github/workflows/pull-compliance.yml +++ b/.github/workflows/compliance.yml @@ -1,5 +1,3 @@ -name: Compliance - on: [pull_request] concurrency: diff --git a/.github/workflows/cron-licenses.yml b/.github/workflows/cron-licenses.yml index 2078e194007a1..155aaacd6b766 100644 --- a/.github/workflows/cron-licenses.yml +++ b/.github/workflows/cron-licenses.yml @@ -1,5 +1,3 @@ -name: "Cron: Update licenses and gitignores" - on: schedule: - cron: "7 0 * * 1" # weekly on Monday at 0:07 UTC diff --git a/.github/workflows/cron-lock.yml b/.github/workflows/cron-lock.yml index af583d14c41f2..3d5ee37267fc5 100644 --- a/.github/workflows/cron-lock.yml +++ b/.github/workflows/cron-lock.yml @@ -1,5 +1,3 @@ -name: Lock Threads - on: schedule: - cron: '0 0 * * *' # Once a day diff --git a/.github/workflows/cron-translations.yml b/.github/workflows/cron-translations.yml index 91e2a66b0eab2..9caad9c927b25 100644 --- a/.github/workflows/cron-translations.yml +++ b/.github/workflows/cron-translations.yml @@ -1,5 +1,3 @@ -name: "Cron: Pull translations from Crowdin" - on: schedule: - cron: "7 0 * * *" # every day at 0:07 UTC diff --git a/.github/workflows/pull-db_test.yml b/.github/workflows/db-tests.yml similarity index 99% rename from .github/workflows/pull-db_test.yml rename to .github/workflows/db-tests.yml index 3f4205fc51ed8..d7e4530b5fbfa 100644 --- a/.github/workflows/pull-db_test.yml +++ b/.github/workflows/db-tests.yml @@ -1,5 +1,3 @@ -name: Database Tests - on: [pull_request] concurrency: diff --git a/.github/workflows/pull-docker_dryrun.yml b/.github/workflows/docker-dryrun.yml similarity index 94% rename from .github/workflows/pull-docker_dryrun.yml rename to .github/workflows/docker-dryrun.yml index d96f315fccaa6..d1ba2983ef53e 100644 --- a/.github/workflows/pull-docker_dryrun.yml +++ b/.github/workflows/docker-dryrun.yml @@ -1,5 +1,3 @@ -name: Docker Dry Run - on: [pull_request] concurrency: diff --git a/.github/workflows/pull-e2e.yml b/.github/workflows/e2e-tests.yml similarity index 97% rename from .github/workflows/pull-e2e.yml rename to .github/workflows/e2e-tests.yml index d1bf09e14e446..cae0ba9079940 100644 --- a/.github/workflows/pull-e2e.yml +++ b/.github/workflows/e2e-tests.yml @@ -1,5 +1,3 @@ -name: E2E Tests - on: [pull_request] concurrency: diff --git a/.github/workflows/push-publish_docs.yml b/.github/workflows/publish-docs.yml similarity index 97% rename from .github/workflows/push-publish_docs.yml rename to .github/workflows/publish-docs.yml index 0ef84c22ea985..f1f83d1f431d9 100644 --- a/.github/workflows/push-publish_docs.yml +++ b/.github/workflows/publish-docs.yml @@ -1,5 +1,3 @@ -name: Publish - on: push: paths: From f340280482c22f5e222863202aca9d9d8aeb53dd Mon Sep 17 00:00:00 2001 From: silverwind Date: Thu, 11 May 2023 19:40:24 +0200 Subject: [PATCH 06/14] add names --- .github/workflows/compliance-docs.yml | 2 ++ .github/workflows/compliance.yml | 2 ++ .github/workflows/cron-licenses.yml | 2 ++ .github/workflows/cron-lock.yml | 2 ++ .github/workflows/cron-translations.yml | 2 ++ .github/workflows/db-tests.yml | 2 ++ .github/workflows/docker-dryrun.yml | 2 ++ .github/workflows/e2e-tests.yml | 2 ++ .github/workflows/publish-docs.yml | 2 ++ 9 files changed, 18 insertions(+) diff --git a/.github/workflows/compliance-docs.yml b/.github/workflows/compliance-docs.yml index 651e14979aaec..44db6d67af10f 100644 --- a/.github/workflows/compliance-docs.yml +++ b/.github/workflows/compliance-docs.yml @@ -1,3 +1,5 @@ +name: compliance-docs + on: pull_request: paths: diff --git a/.github/workflows/compliance.yml b/.github/workflows/compliance.yml index 214a05e7e64eb..c332798491962 100644 --- a/.github/workflows/compliance.yml +++ b/.github/workflows/compliance.yml @@ -1,3 +1,5 @@ +name: compliance + on: [pull_request] concurrency: diff --git a/.github/workflows/cron-licenses.yml b/.github/workflows/cron-licenses.yml index 155aaacd6b766..4aa3841c1c109 100644 --- a/.github/workflows/cron-licenses.yml +++ b/.github/workflows/cron-licenses.yml @@ -1,3 +1,5 @@ +name: cron-licenses + on: schedule: - cron: "7 0 * * 1" # weekly on Monday at 0:07 UTC diff --git a/.github/workflows/cron-lock.yml b/.github/workflows/cron-lock.yml index 3d5ee37267fc5..8d892b0471f61 100644 --- a/.github/workflows/cron-lock.yml +++ b/.github/workflows/cron-lock.yml @@ -1,3 +1,5 @@ +name: cron-lock + on: schedule: - cron: '0 0 * * *' # Once a day diff --git a/.github/workflows/cron-translations.yml b/.github/workflows/cron-translations.yml index 9caad9c927b25..4bcbdf7c5218a 100644 --- a/.github/workflows/cron-translations.yml +++ b/.github/workflows/cron-translations.yml @@ -1,3 +1,5 @@ +name: cron-translations + on: schedule: - cron: "7 0 * * *" # every day at 0:07 UTC diff --git a/.github/workflows/db-tests.yml b/.github/workflows/db-tests.yml index d7e4530b5fbfa..5d0a22876f548 100644 --- a/.github/workflows/db-tests.yml +++ b/.github/workflows/db-tests.yml @@ -1,3 +1,5 @@ +name: db-tests + on: [pull_request] concurrency: diff --git a/.github/workflows/docker-dryrun.yml b/.github/workflows/docker-dryrun.yml index d1ba2983ef53e..ed33c11344e15 100644 --- a/.github/workflows/docker-dryrun.yml +++ b/.github/workflows/docker-dryrun.yml @@ -1,3 +1,5 @@ +name: docker-dryrun + on: [pull_request] concurrency: diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index cae0ba9079940..b9a31cc7d2bac 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -1,3 +1,5 @@ +name: e2e-tests + on: [pull_request] concurrency: diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index f1f83d1f431d9..3ae3a6974b4e8 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -1,3 +1,5 @@ +name: publish-docs + on: push: paths: From ce3cf6b6c5bd7eb9c3af4e381012be2aa8dbd9b4 Mon Sep 17 00:00:00 2001 From: silverwind Date: Thu, 11 May 2023 19:44:08 +0200 Subject: [PATCH 07/14] add repo condition --- .github/workflows/cron-licenses.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cron-licenses.yml b/.github/workflows/cron-licenses.yml index 4aa3841c1c109..266506ef9e2bb 100644 --- a/.github/workflows/cron-licenses.yml +++ b/.github/workflows/cron-licenses.yml @@ -6,6 +6,7 @@ on: jobs: cron-licenses: + if: github.repository == 'go-gitea/gitea' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From f7680f2b10105806b04dde41f0073e006bd7cc74 Mon Sep 17 00:00:00 2001 From: silverwind Date: Thu, 11 May 2023 20:11:24 +0200 Subject: [PATCH 08/14] add pull- prefix again to files --- .../workflows/{compliance-docs.yml => pull-compliance-docs.yml} | 0 .github/workflows/{compliance.yml => pull-compliance.yml} | 0 .github/workflows/{db-tests.yml => pull-db-tests.yml} | 0 .github/workflows/{docker-dryrun.yml => pull-docker-dryrun.yml} | 0 .github/workflows/{e2e-tests.yml => pull-e2e-tests.yml} | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{compliance-docs.yml => pull-compliance-docs.yml} (100%) rename .github/workflows/{compliance.yml => pull-compliance.yml} (100%) rename .github/workflows/{db-tests.yml => pull-db-tests.yml} (100%) rename .github/workflows/{docker-dryrun.yml => pull-docker-dryrun.yml} (100%) rename .github/workflows/{e2e-tests.yml => pull-e2e-tests.yml} (100%) diff --git a/.github/workflows/compliance-docs.yml b/.github/workflows/pull-compliance-docs.yml similarity index 100% rename from .github/workflows/compliance-docs.yml rename to .github/workflows/pull-compliance-docs.yml diff --git a/.github/workflows/compliance.yml b/.github/workflows/pull-compliance.yml similarity index 100% rename from .github/workflows/compliance.yml rename to .github/workflows/pull-compliance.yml diff --git a/.github/workflows/db-tests.yml b/.github/workflows/pull-db-tests.yml similarity index 100% rename from .github/workflows/db-tests.yml rename to .github/workflows/pull-db-tests.yml diff --git a/.github/workflows/docker-dryrun.yml b/.github/workflows/pull-docker-dryrun.yml similarity index 100% rename from .github/workflows/docker-dryrun.yml rename to .github/workflows/pull-docker-dryrun.yml diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/pull-e2e-tests.yml similarity index 100% rename from .github/workflows/e2e-tests.yml rename to .github/workflows/pull-e2e-tests.yml From 27a324061a3b044be2111cdde20b5e649f1af8f1 Mon Sep 17 00:00:00 2001 From: silverwind Date: Thu, 11 May 2023 22:49:03 +0200 Subject: [PATCH 09/14] use timeout-minutes --- .github/workflows/cron-licenses.yml | 4 ++-- .github/workflows/pull-db-tests.yml | 16 ++++++++-------- .github/workflows/pull-e2e-tests.yml | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cron-licenses.yml b/.github/workflows/cron-licenses.yml index 266506ef9e2bb..d3aaedca6d796 100644 --- a/.github/workflows/cron-licenses.yml +++ b/.github/workflows/cron-licenses.yml @@ -13,8 +13,8 @@ jobs: - uses: actions/setup-go@v3 with: go-version: '>=1.20.1' - - name: update licenses and gitignores - run: timeout -s ABRT 40m make generate-license generate-gitignore + - run: make generate-license generate-gitignore + timeout-minutes: 40 - name: push translations to repo uses: appleboy/git-push-action@v0.0.2 with: diff --git a/.github/workflows/pull-db-tests.yml b/.github/workflows/pull-db-tests.yml index 5d0a22876f548..eeb982865001a 100644 --- a/.github/workflows/pull-db-tests.yml +++ b/.github/workflows/pull-db-tests.yml @@ -43,8 +43,8 @@ jobs: - run: make backend env: TAGS: bindata - - name: run tests - run: timeout -s ABRT 50m make test-pgsql-migration test-pgsql + - run: make test-pgsql-migration test-pgsql + timeout-minutes: 50 env: TAGS: bindata gogit RACE_ENABLED: true @@ -64,8 +64,8 @@ jobs: - run: make backend env: TAGS: bindata gogit sqlite sqlite_unlock_notify - - name: run tests - run: timeout -s ABRT 50m make test-sqlite-migration test-sqlite + - run: make test-sqlite-migration test-sqlite + timeout-minutes: 50 env: TAGS: bindata gogit sqlite sqlite_unlock_notify RACE_ENABLED: true @@ -195,8 +195,8 @@ jobs: - run: make backend env: TAGS: bindata - - name: run tests - run: timeout -s ABRT 50m make test-mysql8-migration test-mysql8 + - run: make test-mysql8-migration test-mysql8 + timeout-minutes: 50 env: TAGS: bindata USE_REPO_TEST_DIR: 1 @@ -224,8 +224,8 @@ jobs: - run: make backend env: TAGS: bindata - - name: run tests - run: timeout -s ABRT 50m make test-mssql-migration test-mssql + - run: make test-mssql-migration test-mssql + timeout-minutes: 50 env: TAGS: bindata USE_REPO_TEST_DIR: 1 diff --git a/.github/workflows/pull-e2e-tests.yml b/.github/workflows/pull-e2e-tests.yml index b9a31cc7d2bac..fbe9a1be1dca4 100644 --- a/.github/workflows/pull-e2e-tests.yml +++ b/.github/workflows/pull-e2e-tests.yml @@ -20,7 +20,7 @@ jobs: node-version: 20 - run: make deps-frontend frontend deps-backend - run: npx playwright install --with-deps - - name: run tests - run: timeout -s ABRT 40m make test-e2e-sqlite + - run: make test-e2e-sqlite + timeout-minutes: 40 env: USE_REPO_TEST_DIR: 1 From 5817b0b4949f81b1570480ae9f5d76c5de407653 Mon Sep 17 00:00:00 2001 From: silverwind Date: Thu, 11 May 2023 22:51:34 +0200 Subject: [PATCH 10/14] misc cleanups, remove obvious comments --- .github/workflows/cron-lock.yml | 2 +- .github/workflows/pull-db-tests.yml | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cron-lock.yml b/.github/workflows/cron-lock.yml index 8d892b0471f61..19c77a9b698ef 100644 --- a/.github/workflows/cron-lock.yml +++ b/.github/workflows/cron-lock.yml @@ -2,7 +2,7 @@ name: cron-lock on: schedule: - - cron: '0 0 * * *' # Once a day + - cron: '0 0 * * *' # once a day workflow_dispatch: permissions: diff --git a/.github/workflows/pull-db-tests.yml b/.github/workflows/pull-db-tests.yml index eeb982865001a..24fa2e4ead84a 100644 --- a/.github/workflows/pull-db-tests.yml +++ b/.github/workflows/pull-db-tests.yml @@ -7,7 +7,6 @@ concurrency: cancel-in-progress: true jobs: - # PostgreSQL Tests test-pgsql: runs-on: ubuntu-latest services: @@ -52,7 +51,6 @@ jobs: TEST_LDAP: 1 USE_REPO_TEST_DIR: 1 - # SQLite Tests test-sqlite: runs-on: ubuntu-latest steps: @@ -72,7 +70,6 @@ jobs: TEST_TAGS: gogit sqlite sqlite_unlock_notify USE_REPO_TEST_DIR: 1 - # Unit Tests test-unit: runs-on: ubuntu-latest services: @@ -98,8 +95,7 @@ jobs: - "993:993" redis: image: redis - # Set health checks to wait until redis has started - options: >- + options: >- # wait until redis has started --health-cmd "redis-cli ping" --health-interval 5s --health-timeout 3s @@ -130,7 +126,6 @@ jobs: RACE_ENABLED: true GITHUB_READ_TOKEN: ${{ secrets.GITHUB_READ_TOKEN }} - # MySQL Tests test-mysql5: runs-on: ubuntu-latest services: @@ -173,7 +168,6 @@ jobs: USE_REPO_TEST_DIR: 1 TEST_INDEXER_CODE_ES_URL: "http://elastic:changeme@elasticsearch:9200" - # MySQL8 Tests test-mysql8: runs-on: ubuntu-latest services: @@ -201,7 +195,6 @@ jobs: TAGS: bindata USE_REPO_TEST_DIR: 1 - # MSSQL Tests test-mssql: runs-on: ubuntu-latest services: From 4c78d6ca18cd74d259aae9133fba1c5e019b582b Mon Sep 17 00:00:00 2001 From: silverwind Date: Thu, 11 May 2023 22:54:38 +0200 Subject: [PATCH 11/14] unify cron comments --- .github/workflows/cron-licenses.yml | 2 +- .github/workflows/cron-lock.yml | 2 +- .github/workflows/cron-translations.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cron-licenses.yml b/.github/workflows/cron-licenses.yml index d3aaedca6d796..944bfedd02830 100644 --- a/.github/workflows/cron-licenses.yml +++ b/.github/workflows/cron-licenses.yml @@ -2,7 +2,7 @@ name: cron-licenses on: schedule: - - cron: "7 0 * * 1" # weekly on Monday at 0:07 UTC + - cron: "7 0 * * 1" # every Monday at 00:07 UTC jobs: cron-licenses: diff --git a/.github/workflows/cron-lock.yml b/.github/workflows/cron-lock.yml index 19c77a9b698ef..5a539dde99bb8 100644 --- a/.github/workflows/cron-lock.yml +++ b/.github/workflows/cron-lock.yml @@ -2,7 +2,7 @@ name: cron-lock on: schedule: - - cron: '0 0 * * *' # once a day + - cron: '0 0 * * *' # every day at 00:00 UTC workflow_dispatch: permissions: diff --git a/.github/workflows/cron-translations.yml b/.github/workflows/cron-translations.yml index 4bcbdf7c5218a..97e1ff9739b30 100644 --- a/.github/workflows/cron-translations.yml +++ b/.github/workflows/cron-translations.yml @@ -2,7 +2,7 @@ name: cron-translations on: schedule: - - cron: "7 0 * * *" # every day at 0:07 UTC + - cron: "7 0 * * *" # every day at 00:07 UTC jobs: crowdin-pull: From ac1fbb4d7ec1f9d408a21909754e1928e9d76a55 Mon Sep 17 00:00:00 2001 From: silverwind Date: Thu, 11 May 2023 22:57:19 +0200 Subject: [PATCH 12/14] use double quotes consistently --- .github/workflows/cron-licenses.yml | 4 ++-- .github/workflows/cron-lock.yml | 2 +- .github/workflows/publish-docs.yml | 2 +- .github/workflows/pull-compliance.yml | 12 ++++++------ .github/workflows/pull-db-tests.yml | 12 ++++++------ .github/workflows/pull-e2e-tests.yml | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/cron-licenses.yml b/.github/workflows/cron-licenses.yml index 944bfedd02830..54702f46826f7 100644 --- a/.github/workflows/cron-licenses.yml +++ b/.github/workflows/cron-licenses.yml @@ -6,13 +6,13 @@ on: jobs: cron-licenses: - if: github.repository == 'go-gitea/gitea' + if: github.repository == "go-gitea/gitea" runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: '>=1.20.1' + go-version: ">=1.20.1" - run: make generate-license generate-gitignore timeout-minutes: 40 - name: push translations to repo diff --git a/.github/workflows/cron-lock.yml b/.github/workflows/cron-lock.yml index 5a539dde99bb8..e11869058c985 100644 --- a/.github/workflows/cron-lock.yml +++ b/.github/workflows/cron-lock.yml @@ -2,7 +2,7 @@ name: cron-lock on: schedule: - - cron: '0 0 * * *' # every day at 00:00 UTC + - cron: "0 0 * * *" # every day at 00:00 UTC workflow_dispatch: permissions: diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 3ae3a6974b4e8..de5572a640069 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: '>=1.20.1' + go-version: ">=1.20.1" - name: build docs run: | cd docs diff --git a/.github/workflows/pull-compliance.yml b/.github/workflows/pull-compliance.yml index c332798491962..88342e67d64aa 100644 --- a/.github/workflows/pull-compliance.yml +++ b/.github/workflows/pull-compliance.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: '>=1.20' + go-version: ">=1.20" check-latest: true - run: make deps-backend deps-tools - run: make lint-backend @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: '>=1.20' + go-version: ">=1.20" check-latest: true - run: make deps-backend deps-tools - run: make lint-go-windows lint-go-vet @@ -39,7 +39,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: '>=1.20' + go-version: ">=1.20" check-latest: true - run: make deps-backend deps-tools - run: make lint-go @@ -51,10 +51,10 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: '>=1.20' + go-version: ">=1.20" check-latest: true - run: make deps-backend deps-tools - - run: make --always-make checks-backend # ensure the 'go-licenses' make target runs + - run: make --always-make checks-backend # ensure the "go-licenses" make target runs frontend: runs-on: ubuntu-latest steps: @@ -71,7 +71,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: '>=1.20' + go-version: ">=1.20" check-latest: true - uses: actions/setup-node@v3 with: diff --git a/.github/workflows/pull-db-tests.yml b/.github/workflows/pull-db-tests.yml index 24fa2e4ead84a..4011b4201be27 100644 --- a/.github/workflows/pull-db-tests.yml +++ b/.github/workflows/pull-db-tests.yml @@ -35,7 +35,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: '>=1.20.0' + go-version: ">=1.20.0" - name: Add hosts to /etc/hosts run: echo "127.0.0.1 pgsql ldap minio" | sudo tee -a /etc/hosts - run: make deps-backend @@ -57,7 +57,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: '>=1.20.0' + go-version: ">=1.20.0" - run: make deps-backend - run: make backend env: @@ -106,7 +106,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: '>=1.20.0' + go-version: ">=1.20.0" - name: Add hosts to /etc/hosts run: echo "127.0.0.1 mysql elasticsearch smtpimap" | sudo tee -a /etc/hosts - run: make deps-backend @@ -153,7 +153,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: '>=1.20.0' + go-version: ">=1.20.0" - name: Add hosts to /etc/hosts run: echo "127.0.0.1 mysql elasticsearch smtpimap" | sudo tee -a /etc/hosts - run: make deps-backend @@ -182,7 +182,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: '>=1.20.0' + go-version: ">=1.20.0" - name: Add hosts to /etc/hosts run: echo "127.0.0.1 mysql8" | sudo tee -a /etc/hosts - run: make deps-backend @@ -210,7 +210,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: '>=1.20.0' + go-version: ">=1.20.0" - name: Add hosts to /etc/hosts run: echo "127.0.0.1 mssql" | sudo tee -a /etc/hosts - run: make deps-backend diff --git a/.github/workflows/pull-e2e-tests.yml b/.github/workflows/pull-e2e-tests.yml index fbe9a1be1dca4..a854489e4d0e9 100644 --- a/.github/workflows/pull-e2e-tests.yml +++ b/.github/workflows/pull-e2e-tests.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v4 with: - go-version: '>=1.20' + go-version: ">=1.20" check-latest: true - uses: actions/setup-node@v3 with: From 62daf46bce7319e8b44659c2eb1e141bf5b735d3 Mon Sep 17 00:00:00 2001 From: silverwind Date: Thu, 11 May 2023 23:03:07 +0200 Subject: [PATCH 13/14] add workflows to editorconfig lint --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3c44e65dfa9f2..3d777505a56f2 100644 --- a/Makefile +++ b/Makefile @@ -409,7 +409,7 @@ lint-go-vet: .PHONY: lint-editorconfig lint-editorconfig: - $(GO) run $(EDITORCONFIG_CHECKER_PACKAGE) templates + $(GO) run $(EDITORCONFIG_CHECKER_PACKAGE) templates .github/workflows .PHONY: watch watch: From 607f6568a9ad1645d2938fccc40e6a05f855171c Mon Sep 17 00:00:00 2001 From: silverwind Date: Thu, 11 May 2023 23:05:01 +0200 Subject: [PATCH 14/14] Update .github/workflows/pull-docker-dryrun.yml Co-authored-by: Yarden Shoham --- .github/workflows/pull-docker-dryrun.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pull-docker-dryrun.yml b/.github/workflows/pull-docker-dryrun.yml index ed33c11344e15..3d2207940fc65 100644 --- a/.github/workflows/pull-docker-dryrun.yml +++ b/.github/workflows/pull-docker-dryrun.yml @@ -10,7 +10,6 @@ jobs: docker-dryrun: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - uses: docker/setup-buildx-action@v2 - uses: docker/build-push-action@v4 with: