From f9d75d4705ece5c119f2fd5e2bfbaf630d0bf739 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Sun, 28 May 2023 15:31:52 +0200 Subject: [PATCH] [CI] remove GitHub workflows --- .github/workflows/cron-licenses.yml | 27 -- .github/workflows/cron-lock.yml | 22 -- .github/workflows/cron-translations.yml | 48 ---- .github/workflows/publish-docs.yml | 29 --- .github/workflows/pull-compliance-docs.yml | 22 -- .../workflows/pull-compliance-docsignore.yml | 43 ---- .github/workflows/pull-compliance.yml | 103 -------- .../workflows/pull-db-tests-docsignore.yml | 38 --- .github/workflows/pull-db-tests.yml | 235 ------------------ .../pull-docker-dryrun-docsignore.yml | 13 - .github/workflows/pull-docker-dryrun.yml | 21 -- .../workflows/pull-e2e-tests-docsignore.yml | 13 - .github/workflows/pull-e2e-tests.yml | 30 --- 13 files changed, 644 deletions(-) delete mode 100644 .github/workflows/cron-licenses.yml delete mode 100644 .github/workflows/cron-lock.yml delete mode 100644 .github/workflows/cron-translations.yml delete mode 100644 .github/workflows/publish-docs.yml delete mode 100644 .github/workflows/pull-compliance-docs.yml delete mode 100644 .github/workflows/pull-compliance-docsignore.yml delete mode 100644 .github/workflows/pull-compliance.yml delete mode 100644 .github/workflows/pull-db-tests-docsignore.yml delete mode 100644 .github/workflows/pull-db-tests.yml delete mode 100644 .github/workflows/pull-docker-dryrun-docsignore.yml delete mode 100644 .github/workflows/pull-docker-dryrun.yml delete mode 100644 .github/workflows/pull-e2e-tests-docsignore.yml delete mode 100644 .github/workflows/pull-e2e-tests.yml diff --git a/.github/workflows/cron-licenses.yml b/.github/workflows/cron-licenses.yml deleted file mode 100644 index 17b0d686d8..0000000000 --- a/.github/workflows/cron-licenses.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: cron-licenses - -on: - schedule: - - cron: "7 0 * * 1" # every Monday at 00:07 UTC - -jobs: - cron-licenses: - runs-on: ubuntu-latest - if: github.repository == 'go-gitea/gitea' - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 - with: - go-version: ">=1.20.1" - - run: make generate-license generate-gitignore - timeout-minutes: 40 - - name: push translations to repo - uses: appleboy/git-push-action@v0.0.2 - with: - author_email: "teabot@gitea.io" - author_name: GiteaBot - branch: main - commit: true - commit_message: "[skip ci] Updated licenses and gitignores" - remote: "git@github.com:go-gitea/gitea.git" - ssh_key: ${{ secrets.DEPLOY_KEY }} diff --git a/.github/workflows/cron-lock.yml b/.github/workflows/cron-lock.yml deleted file mode 100644 index 935f926cce..0000000000 --- a/.github/workflows/cron-lock.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: cron-lock - -on: - schedule: - - cron: "0 0 * * *" # every day at 00:00 UTC - workflow_dispatch: - -permissions: - issues: write - pull-requests: write - -concurrency: - group: lock - -jobs: - action: - runs-on: ubuntu-latest - if: github.repository == 'go-gitea/gitea' - steps: - - uses: dessant/lock-threads@v4 - with: - issue-inactive-days: 45 diff --git a/.github/workflows/cron-translations.yml b/.github/workflows/cron-translations.yml deleted file mode 100644 index a7c9ceabd3..0000000000 --- a/.github/workflows/cron-translations.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: cron-translations - -on: - schedule: - - cron: "7 0 * * *" # every day at 00:07 UTC - -jobs: - crowdin-pull: - runs-on: ubuntu-latest - if: github.repository == 'go-gitea/gitea' - steps: - - uses: actions/checkout@v3 - - name: download from crowdin - uses: docker://jonasfranz/crowdin - env: - CROWDIN_KEY: ${{ secrets.CROWDIN_KEY }} - PLUGIN_DOWNLOAD: true - PLUGIN_EXPORT_DIR: options/locale/ - PLUGIN_IGNORE_BRANCH: true - PLUGIN_PROJECT_IDENTIFIER: gitea - - name: update locales - run: ./build/update-locales.sh - - name: push translations to repo - uses: appleboy/git-push-action@v0.0.2 - with: - author_email: "teabot@gitea.io" - author_name: GiteaBot - branch: main - commit: true - commit_message: "[skip ci] Updated translations via Crowdin" - remote: "git@github.com:go-gitea/gitea.git" - ssh_key: ${{ secrets.DEPLOY_KEY }} - crowdin-push: - runs-on: ubuntu-latest - if: github.repository == 'go-gitea/gitea' - steps: - - uses: actions/checkout@v3 - - name: push translations to crowdin - uses: docker://jonasfranz/crowdin - env: - CROWDIN_KEY: ${{ secrets.CROWDIN_KEY }} - PLUGIN_UPLOAD: true - PLUGIN_EXPORT_DIR: options/locale/ - PLUGIN_IGNORE_BRANCH: true - PLUGIN_PROJECT_IDENTIFIER: gitea - PLUGIN_FILES: | - locale_en-US.ini: options/locale/locale_en-US.ini - PLUGIN_BRANCH: main diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml deleted file mode 100644 index de5572a640..0000000000 --- a/.github/workflows/publish-docs.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: publish-docs - -on: - push: - paths: - - "docs/**" - branches: - - main - -jobs: - compliance-docs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - go-version: ">=1.20.1" - - name: build docs - run: | - cd docs - make trans-copy clean build - - name: publish to netlify - uses: nwtgck/actions-netlify@v2.0 - with: - production-branch: main - publish-dir: docs/public/ - env: - NETLIFY_SITE_ID: d2260bae-7861-4c02-8646-8f6440b12672 - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} diff --git a/.github/workflows/pull-compliance-docs.yml b/.github/workflows/pull-compliance-docs.yml deleted file mode 100644 index 44db6d67af..0000000000 --- a/.github/workflows/pull-compliance-docs.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: compliance-docs - -on: - pull_request: - paths: - - "docs/**" - - "*.md" - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - compliance-docs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 20 - - run: make deps-frontend - - run: make lint-md diff --git a/.github/workflows/pull-compliance-docsignore.yml b/.github/workflows/pull-compliance-docsignore.yml deleted file mode 100644 index ea0619e122..0000000000 --- a/.github/workflows/pull-compliance-docsignore.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: compliance - -on: - pull_request: - paths: - - "docs/**" - - "*.md" - -jobs: - compliance-docs: - runs-on: ubuntu-latest - steps: - - run: echo "No build required" - - lint-backend: - runs-on: ubuntu-latest - steps: - - run: echo "No build required" - - lint-go-windows: - runs-on: ubuntu-latest - steps: - - run: echo "No build required" - - lint-go-gogit: - runs-on: ubuntu-latest - steps: - - run: echo "No build required" - - checks-backend: - runs-on: ubuntu-latest - steps: - - run: echo "No build required" - - frontend: - runs-on: ubuntu-latest - steps: - - run: echo "No build required" - - backend: - runs-on: ubuntu-latest - steps: - - run: echo "No build required" diff --git a/.github/workflows/pull-compliance.yml b/.github/workflows/pull-compliance.yml deleted file mode 100644 index ace2b15a9b..0000000000 --- a/.github/workflows/pull-compliance.yml +++ /dev/null @@ -1,103 +0,0 @@ -name: compliance - -on: - pull_request: - paths-ignore: - - "docs/**" - - "*.md" - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - lint-backend: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - go-version: ">=1.20" - check-latest: true - - run: make deps-backend deps-tools - - run: make lint-backend - env: - TAGS: bindata sqlite sqlite_unlock_notify - lint-go-windows: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - go-version: ">=1.20" - check-latest: true - - run: make deps-backend deps-tools - - run: make lint-go-windows lint-go-vet - env: - TAGS: bindata sqlite sqlite_unlock_notify - GOOS: windows - GOARCH: amd64 - lint-go-gogit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - go-version: ">=1.20" - check-latest: true - - run: make deps-backend deps-tools - - run: make lint-go - env: - TAGS: bindata gogit sqlite sqlite_unlock_notify - checks-backend: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - 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 - frontend: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 20 - - run: make deps-frontend - - run: make lint-frontend - - run: make checks-frontend - backend: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - go-version: ">=1.20" - check-latest: true - - uses: actions/setup-node@v3 - with: - node-version: 20 - - 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 - - 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 diff --git a/.github/workflows/pull-db-tests-docsignore.yml b/.github/workflows/pull-db-tests-docsignore.yml deleted file mode 100644 index c04f763c3e..0000000000 --- a/.github/workflows/pull-db-tests-docsignore.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: db-tests - -on: - pull_request: - paths: - - "docs/**" - - "*.md" - -jobs: - test-pgsql: - runs-on: ubuntu-latest - steps: - - run: echo "No build required" - - test-sqlite: - runs-on: ubuntu-latest - steps: - - run: echo "No build required" - - test-unit: - runs-on: ubuntu-latest - steps: - - run: echo "No build required" - - test-mysql5: - runs-on: ubuntu-latest - steps: - - run: echo "No build required" - - test-mysql8: - runs-on: ubuntu-latest - steps: - - run: echo "No build required" - - test-mssql: - runs-on: ubuntu-latest - steps: - - run: echo "No build required" diff --git a/.github/workflows/pull-db-tests.yml b/.github/workflows/pull-db-tests.yml deleted file mode 100644 index b3b02f15ca..0000000000 --- a/.github/workflows/pull-db-tests.yml +++ /dev/null @@ -1,235 +0,0 @@ -name: db-tests - -on: - pull_request: - paths-ignore: - - "docs/**" - - "*.md" - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - test-pgsql: - runs-on: ubuntu-latest - services: - pgsql: - image: postgres:15 - env: - POSTGRES_DB: test - POSTGRES_PASSWORD: postgres - ports: - - "5432:5432" - ldap: - image: gitea/test-openldap:latest - ports: - - "389:389" - - "636:636" - minio: - # as github actions doesn't support "entrypoint", we need to use a non-official image - # that has a custom entrypoint set to "minio server /data" - image: bitnami/minio:2021.3.17 - env: - MINIO_ACCESS_KEY: 123456 - MINIO_SECRET_KEY: 12345678 - ports: - - "9000:9000" - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - go-version: ">=1.20.0" - - name: Add hosts to /etc/hosts - run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 pgsql ldap minio" | sudo tee -a /etc/hosts' - - run: make deps-backend - - run: make backend - env: - TAGS: bindata - - run: make test-pgsql-migration test-pgsql - timeout-minutes: 50 - env: - TAGS: bindata gogit - RACE_ENABLED: true - TEST_TAGS: gogit - TEST_LDAP: 1 - USE_REPO_TEST_DIR: 1 - - test-sqlite: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - go-version: ">=1.20.0" - - run: make deps-backend - - run: make backend - env: - TAGS: bindata gogit sqlite sqlite_unlock_notify - - run: make test-sqlite-migration test-sqlite - timeout-minutes: 50 - env: - TAGS: bindata gogit sqlite sqlite_unlock_notify - RACE_ENABLED: true - TEST_TAGS: gogit sqlite sqlite_unlock_notify - USE_REPO_TEST_DIR: 1 - - test-unit: - runs-on: ubuntu-latest - services: - mysql: - image: mysql:5.7 - env: - MYSQL_ALLOW_EMPTY_PASSWORD: yes - MYSQL_DATABASE: test - ports: - - "3306:3306" - elasticsearch: - image: elasticsearch:7.5.0 - env: - discovery.type: single-node - ports: - - "9200:9200" - smtpimap: - image: tabascoterrier/docker-imap-devel:latest - ports: - - "25:25" - - "143:143" - - "587:587" - - "993:993" - redis: - image: redis - options: >- # wait until redis has started - --health-cmd "redis-cli ping" - --health-interval 5s - --health-timeout 3s - --health-retries 10 - ports: - - 6379:6379 - minio: - image: bitnami/minio:2021.3.17 - env: - MINIO_ACCESS_KEY: 123456 - MINIO_SECRET_KEY: 12345678 - ports: - - "9000:9000" - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - go-version: ">=1.20.0" - - name: Add hosts to /etc/hosts - run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mysql elasticsearch smtpimap" | sudo tee -a /etc/hosts' - - run: make deps-backend - - run: make backend - env: - TAGS: bindata - - name: unit-tests - run: make unit-test-coverage test-check - env: - TAGS: bindata - RACE_ENABLED: true - GITHUB_READ_TOKEN: ${{ secrets.GITHUB_READ_TOKEN }} - - name: unit-tests-gogit - run: make unit-test-coverage test-check - env: - TAGS: bindata gogit - RACE_ENABLED: true - GITHUB_READ_TOKEN: ${{ secrets.GITHUB_READ_TOKEN }} - - test-mysql5: - runs-on: ubuntu-latest - services: - mysql: - image: mysql:5.7 - env: - MYSQL_ALLOW_EMPTY_PASSWORD: yes - MYSQL_DATABASE: test - ports: - - "3306:3306" - elasticsearch: - image: elasticsearch:7.5.0 - env: - discovery.type: single-node - ports: - - "9200:9200" - smtpimap: - image: tabascoterrier/docker-imap-devel:latest - ports: - - "25:25" - - "143:143" - - "587:587" - - "993:993" - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - go-version: ">=1.20.0" - - name: Add hosts to /etc/hosts - run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mysql elasticsearch smtpimap" | sudo tee -a /etc/hosts' - - run: make deps-backend - - run: make backend - env: - TAGS: bindata - - name: run tests - run: make test-mysql-migration integration-test-coverage - env: - TAGS: bindata - RACE_ENABLED: true - USE_REPO_TEST_DIR: 1 - TEST_INDEXER_CODE_ES_URL: "http://elastic:changeme@elasticsearch:9200" - - test-mysql8: - runs-on: ubuntu-latest - services: - mysql8: - image: mysql:8 - env: - MYSQL_ALLOW_EMPTY_PASSWORD: yes - MYSQL_DATABASE: testgitea - ports: - - "3306:3306" - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - go-version: ">=1.20.0" - - name: Add hosts to /etc/hosts - run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mysql8" | sudo tee -a /etc/hosts' - - run: make deps-backend - - run: make backend - env: - TAGS: bindata - - run: make test-mysql8-migration test-mysql8 - timeout-minutes: 50 - env: - TAGS: bindata - USE_REPO_TEST_DIR: 1 - - test-mssql: - runs-on: ubuntu-latest - services: - mssql: - image: mcr.microsoft.com/mssql/server:latest - env: - ACCEPT_EULA: Y - MSSQL_PID: Standard - SA_PASSWORD: MwantsaSecurePassword1 - ports: - - "1433:1433" - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - go-version: ">=1.20.0" - - name: Add hosts to /etc/hosts - run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mssql" | sudo tee -a /etc/hosts' - - run: make deps-backend - - run: make backend - env: - TAGS: bindata - - run: make test-mssql-migration test-mssql - timeout-minutes: 50 - env: - TAGS: bindata - USE_REPO_TEST_DIR: 1 diff --git a/.github/workflows/pull-docker-dryrun-docsignore.yml b/.github/workflows/pull-docker-dryrun-docsignore.yml deleted file mode 100644 index 7c74efb34a..0000000000 --- a/.github/workflows/pull-docker-dryrun-docsignore.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: docker-dryrun - -on: - pull_request: - paths: - - "docs/**" - - "*.md" - -jobs: - docker-dryrun: - runs-on: ubuntu-latest - steps: - - run: echo "No build required" diff --git a/.github/workflows/pull-docker-dryrun.yml b/.github/workflows/pull-docker-dryrun.yml deleted file mode 100644 index c3cdefc7a7..0000000000 --- a/.github/workflows/pull-docker-dryrun.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: docker-dryrun - -on: - pull_request: - paths-ignore: - - "docs/**" - - "*.md" - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - docker-dryrun: - runs-on: ubuntu-latest - steps: - - 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-tests-docsignore.yml b/.github/workflows/pull-e2e-tests-docsignore.yml deleted file mode 100644 index e809af7216..0000000000 --- a/.github/workflows/pull-e2e-tests-docsignore.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: e2e-tests - -on: - pull_request: - paths: - - "docs/**" - - "*.md" - -jobs: - test-e2e: - runs-on: ubuntu-latest - steps: - - run: echo "No build required" diff --git a/.github/workflows/pull-e2e-tests.yml b/.github/workflows/pull-e2e-tests.yml deleted file mode 100644 index 611a6b0741..0000000000 --- a/.github/workflows/pull-e2e-tests.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: e2e-tests - -on: - pull_request: - paths-ignore: - - "docs/**" - - "*.md" - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - test-e2e: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - go-version: ">=1.20" - check-latest: true - - uses: actions/setup-node@v3 - with: - node-version: 20 - - run: make deps-frontend frontend deps-backend - - run: npx playwright install --with-deps - - run: make test-e2e-sqlite - timeout-minutes: 40 - env: - USE_REPO_TEST_DIR: 1