From f78372ee1cf02331c7a727f56831912ecefc99b7 Mon Sep 17 00:00:00 2001 From: maias1907 <144439334+maias1907@users.noreply.github.com> Date: Mon, 17 Feb 2025 10:04:46 +0200 Subject: [PATCH 01/89] Workflow build enviroment --- workflows/build.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 workflows/build.yml diff --git a/workflows/build.yml b/workflows/build.yml new file mode 100644 index 0000000000000..32e78a392e0ab --- /dev/null +++ b/workflows/build.yml @@ -0,0 +1,34 @@ +name: Build and Push Docker Image + +on: + push: + branches: + - main # Runs when pushing to main branch + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest # Uses a Linux system + + steps: + - name: Checkout repository + uses: actions/checkout@v3 # Gets your code + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 # Prepares Docker builder + + - name: Log in to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + context: . + file: ./Dockerfile + push: true + tags: your-dockerhub-username/gitea:latest From 4a9445cb7c971eec41c33f3a5487e955b4a047d8 Mon Sep 17 00:00:00 2001 From: maias1907 <144439334+maias1907@users.noreply.github.com> Date: Mon, 17 Feb 2025 10:18:10 +0200 Subject: [PATCH 02/89] Workflow build enviroment --- {workflows => .github/workflows}/build.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {workflows => .github/workflows}/build.yml (100%) diff --git a/workflows/build.yml b/.github/workflows/build.yml similarity index 100% rename from workflows/build.yml rename to .github/workflows/build.yml From 480b4bdeae90e1cf0f2f0a84e69ec4cd400d827b Mon Sep 17 00:00:00 2001 From: maias1907 <144439334+maias1907@users.noreply.github.com> Date: Mon, 17 Feb 2025 10:32:51 +0200 Subject: [PATCH 03/89] Workflow build enviroment --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 32e78a392e0ab..07fba80bae557 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,8 +16,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 # Gets your code - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 # Prepares Docker builder + - name: Log in to DockerHub uses: docker/login-action@v2 From d48415dc152313355a312af30db2166a864e2e25 Mon Sep 17 00:00:00 2001 From: maias1907 <144439334+maias1907@users.noreply.github.com> Date: Mon, 17 Feb 2025 11:57:23 +0200 Subject: [PATCH 04/89] Workflow build enviroment --- .github/workflows/build.yml | 61 ++++++++++++++++++++++++++++--------- 1 file changed, 46 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 07fba80bae557..335b3bb832e72 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,33 +1,64 @@ -name: Build and Push Docker Image +name: Gitea CI Workflow on: push: branches: - - main # Runs when pushing to main branch + - main # Trigger on push to the main branch pull_request: branches: - - main + - main # Trigger on pull requests to the main branch jobs: build: - runs-on: ubuntu-latest # Uses a Linux system + runs-on: ubuntu-latest steps: + # Step 1: Checkout the code from the repository - name: Checkout repository - uses: actions/checkout@v3 # Gets your code + uses: actions/checkout@v2 + # Step 2: Set up Go (Gitea is written in Go) + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: '1.24.0' # Use the Go version that Gitea supports + + # Step 3: Install dependencies + - name: Install dependencies + run: | + go mod tidy + + # Step 4: Run tests + - name: Run tests + run: | + go test ./... -v # Run all Go tests in the repository + docker: + runs-on: ubuntu-latest + needs: build # This will wait until the 'build' job is finished - - name: Log in to DockerHub + steps: + # Step 1: Checkout the repository + - name: Checkout repository + uses: actions/checkout@v2 + + # Step 2: Set up Docker + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + # Step 3: Log in to Docker Hub + - name: Log in to Docker Hub uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + username: ${{ secrets.DOCKER_USERNAME }} # Store your Docker username as a secret in GitHub + password: ${{ secrets.DOCKER_PASSWORD }} # Store your Docker password as a secret in GitHub - - name: Build and push Docker image - uses: docker/build-push-action@v4 - with: - context: . - file: ./Dockerfile - push: true - tags: your-dockerhub-username/gitea:latest + # Step 4: Build the Docker image + - name: Build Docker image + run: | + docker build -t maias816/gitea:latest . + + # Step 5: Push the Docker image to Docker Hub + - name: Push Docker image + run: | + docker push maias816/gitea:latest From 9df3226107714fc3563e7c09b0ef6cccf4f71a3f Mon Sep 17 00:00:00 2001 From: maias1907 <144439334+maias1907@users.noreply.github.com> Date: Mon, 17 Feb 2025 12:08:08 +0200 Subject: [PATCH 05/89] Workflow build enviroment --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 335b3bb832e72..3c346450d29b0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,10 +28,10 @@ jobs: run: | go mod tidy - # Step 4: Run tests - - name: Run tests + # Step 4: Run only the specific test (TestIsValidUsername) + - name: Run specific test run: | - go test ./... -v # Run all Go tests in the repository + go test -run ^TestIsValidUsername$ ./... -v # Run only TestIsValidUsername docker: runs-on: ubuntu-latest From 65ba6e689c7e4dd0cfb476da059c60d4068aa0dc Mon Sep 17 00:00:00 2001 From: maias1907 <144439334+maias1907@users.noreply.github.com> Date: Mon, 17 Feb 2025 12:18:58 +0200 Subject: [PATCH 06/89] Workflow build enviroment --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3c346450d29b0..fd8ffd1d15940 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,9 +29,9 @@ jobs: go mod tidy # Step 4: Run only the specific test (TestIsValidUsername) - - name: Run specific test + - name: Run Password Test run: | - go test -run ^TestIsValidUsername$ ./... -v # Run only TestIsValidUsername + go test -run TestPassword ./... -v # Run only TestIsValidUsername docker: runs-on: ubuntu-latest From c7e79bc0b630ec0ad3def813fb7fef08f6c97f4e Mon Sep 17 00:00:00 2001 From: maias1907 <144439334+maias1907@users.noreply.github.com> Date: Mon, 17 Feb 2025 12:27:00 +0200 Subject: [PATCH 07/89] Workflow build enviroment --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fd8ffd1d15940..59f208c264e90 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,8 +30,8 @@ jobs: # Step 4: Run only the specific test (TestIsValidUsername) - name: Run Password Test - run: | - go test -run TestPassword ./... -v # Run only TestIsValidUsername + run: + docker: runs-on: ubuntu-latest From 6099110bff2cbc949e1ffddc516ce1b395ad47f0 Mon Sep 17 00:00:00 2001 From: maias1907 <144439334+maias1907@users.noreply.github.com> Date: Mon, 17 Feb 2025 12:27:39 +0200 Subject: [PATCH 08/89] Workflow build enviroment --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 59f208c264e90..10f99230e5e85 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,8 +29,8 @@ jobs: go mod tidy # Step 4: Run only the specific test (TestIsValidUsername) - - name: Run Password Test - run: + #- name: Run Password Test + #run: docker: From df080f45f609082a5bd55fb03b2a8c504c729a9a Mon Sep 17 00:00:00 2001 From: maias1907 <144439334+maias1907@users.noreply.github.com> Date: Mon, 17 Feb 2025 13:00:31 +0200 Subject: [PATCH 09/89] Workflow build enviroment --- .github/workflows/build.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 10f99230e5e85..b1cecfd87138e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,10 +3,8 @@ name: Gitea CI Workflow on: push: branches: - - main # Trigger on push to the main branch - pull_request: - branches: - - main # Trigger on pull requests to the main branch + - dev # Trigger on push to the dev branch + jobs: build: @@ -27,8 +25,13 @@ jobs: - name: Install dependencies run: | go mod tidy + # Step 4: Run Linting (you can use golangci-lint for Go code linting) + - name: Run GolangCI Lint + uses: golangci/golangci-lint-action@v3 + with: + version: v1.64.5 # Make sure to use the right version for your setup - # Step 4: Run only the specific test (TestIsValidUsername) + # Step 4: Run only the specific test (TestIsValidUsername) #- name: Run Password Test #run: From 34a471b6b78cac9fa0b688f53c7386ba19d5148f Mon Sep 17 00:00:00 2001 From: maias1907 <144439334+maias1907@users.noreply.github.com> Date: Mon, 17 Feb 2025 13:14:50 +0200 Subject: [PATCH 10/89] Workflow build enviroment --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b1cecfd87138e..a4f9205329227 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: '1.24.0' # Use the Go version that Gitea supports + go-version: '1.19.13' # Use the Go version that Gitea supports # Step 3: Install dependencies - name: Install dependencies From 432c45729bb1c40275e0f07ed708169382fd85f2 Mon Sep 17 00:00:00 2001 From: maias1907 <144439334+maias1907@users.noreply.github.com> Date: Mon, 17 Feb 2025 13:16:17 +0200 Subject: [PATCH 11/89] Workflow build enviroment --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a4f9205329227..8f0648c84e37c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: '1.19.13' # Use the Go version that Gitea supports + go-version: '1.20' # Use the Go version that Gitea supports # Step 3: Install dependencies - name: Install dependencies From 35b2ceb113f7b588ca611094f059259f63af4f3f Mon Sep 17 00:00:00 2001 From: maias1907 <144439334+maias1907@users.noreply.github.com> Date: Mon, 17 Feb 2025 13:30:03 +0200 Subject: [PATCH 12/89] Workflow build enviroment --- .github/workflows/build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8f0648c84e37c..62743639f9f3f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: '1.20' # Use the Go version that Gitea supports + go-version: '1.24.0' # Use the Go version that Gitea supports # Step 3: Install dependencies - name: Install dependencies @@ -30,6 +30,10 @@ jobs: uses: golangci/golangci-lint-action@v3 with: version: v1.64.5 # Make sure to use the right version for your setup + args: | + --disable=staticcheck + --disable=tenv + --output-format=colored-line-number # Step 4: Run only the specific test (TestIsValidUsername) #- name: Run Password Test From c0689906cad598b1853d5e12d412637150f6134b Mon Sep 17 00:00:00 2001 From: maias1907 <144439334+maias1907@users.noreply.github.com> Date: Mon, 17 Feb 2025 13:33:36 +0200 Subject: [PATCH 13/89] Workflow build enviroment --- .github/workflows/build.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 62743639f9f3f..7ae31e52bc0c6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,7 +5,6 @@ on: branches: - dev # Trigger on push to the dev branch - jobs: build: runs-on: ubuntu-latest @@ -25,20 +24,16 @@ jobs: - name: Install dependencies run: | go mod tidy - # Step 4: Run Linting (you can use golangci-lint for Go code linting) + + # Step 4: Run Linting (you can use golangci-lint for Go code linting) - name: Run GolangCI Lint uses: golangci/golangci-lint-action@v3 with: - version: v1.64.5 # Make sure to use the right version for your setup - args: | - --disable=staticcheck - --disable=tenv - --output-format=colored-line-number - - # Step 4: Run only the specific test (TestIsValidUsername) - #- name: Run Password Test - #run: - + version: v1.64.5 # Specify the GolangCI Lint version + extra_args: | + --disable=staticcheck + --disable=tenv + --output-format=colored-line-number docker: runs-on: ubuntu-latest From 4b662ce009f28c9544b3a17bbcf1d3957c52d042 Mon Sep 17 00:00:00 2001 From: maias1907 <144439334+maias1907@users.noreply.github.com> Date: Mon, 17 Feb 2025 13:39:28 +0200 Subject: [PATCH 14/89] Workflow build enviroment --- .github/workflows/build.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7ae31e52bc0c6..a1e692f5f09fa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,15 +25,7 @@ jobs: run: | go mod tidy - # Step 4: Run Linting (you can use golangci-lint for Go code linting) - - name: Run GolangCI Lint - uses: golangci/golangci-lint-action@v3 - with: - version: v1.64.5 # Specify the GolangCI Lint version - extra_args: | - --disable=staticcheck - --disable=tenv - --output-format=colored-line-number + docker: runs-on: ubuntu-latest From 5c13c95e3e486b94f4810774cb9669b4617ee67d Mon Sep 17 00:00:00 2001 From: maias1907 <144439334+maias1907@users.noreply.github.com> Date: Mon, 17 Feb 2025 13:58:19 +0200 Subject: [PATCH 15/89] Workflow build enviroment --- .github/workflows/build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a1e692f5f09fa..7645109c8ffe6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,11 @@ jobs: - name: Install dependencies run: | go mod tidy - + # Step 4: Run Staticcheck + - name: Run Staticcheck + run: | + go install honnef.co/go/tools/cmd/staticcheck@latest # Install staticcheck + staticcheck ./... # Run staticcheck on all Go files docker: From 11a10c6166e7b2888f8488d852985b76a8ab1414 Mon Sep 17 00:00:00 2001 From: maias1907 <144439334+maias1907@users.noreply.github.com> Date: Mon, 17 Feb 2025 14:06:09 +0200 Subject: [PATCH 16/89] Workflow build enviroment --- .github/workflows/build.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7645109c8ffe6..a1e692f5f09fa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,11 +24,7 @@ jobs: - name: Install dependencies run: | go mod tidy - # Step 4: Run Staticcheck - - name: Run Staticcheck - run: | - go install honnef.co/go/tools/cmd/staticcheck@latest # Install staticcheck - staticcheck ./... # Run staticcheck on all Go files + docker: From eb55ab3b9bc0fa58f43cab75ead68d0a1bb2c3c6 Mon Sep 17 00:00:00 2001 From: maias1907 <144439334+maias1907@users.noreply.github.com> Date: Thu, 20 Feb 2025 22:24:37 +0200 Subject: [PATCH 17/89] Initial commit --- README.md | 160 +----------------------------------------------------- 1 file changed, 1 insertion(+), 159 deletions(-) diff --git a/README.md b/README.md index f747d993d7984..5852f44639f52 100644 --- a/README.md +++ b/README.md @@ -1,159 +1 @@ -# Gitea - -[![](https://github.com/go-gitea/gitea/actions/workflows/release-nightly.yml/badge.svg?branch=main)](https://github.com/go-gitea/gitea/actions/workflows/release-nightly.yml?query=branch%3Amain "Release Nightly") -[![](https://img.shields.io/discord/322538954119184384.svg?logo=discord&logoColor=white&label=Discord&color=5865F2)](https://discord.gg/Gitea "Join the Discord chat at https://discord.gg/Gitea") -[![](https://goreportcard.com/badge/code.gitea.io/gitea)](https://goreportcard.com/report/code.gitea.io/gitea "Go Report Card") -[![](https://pkg.go.dev/badge/code.gitea.io/gitea?status.svg)](https://pkg.go.dev/code.gitea.io/gitea "GoDoc") -[![](https://img.shields.io/github/release/go-gitea/gitea.svg)](https://github.com/go-gitea/gitea/releases/latest "GitHub release") -[![](https://www.codetriage.com/go-gitea/gitea/badges/users.svg)](https://www.codetriage.com/go-gitea/gitea "Help Contribute to Open Source") -[![](https://opencollective.com/gitea/tiers/backers/badge.svg?label=backers&color=brightgreen)](https://opencollective.com/gitea "Become a backer/sponsor of gitea") -[![](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT "License: MIT") -[![Contribute with Gitpod](https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod&color=green)](https://gitpod.io/#https://github.com/go-gitea/gitea) -[![](https://badges.crowdin.net/gitea/localized.svg)](https://translate.gitea.com "Crowdin") - -[View this document in Chinese](./README_ZH.md) - -## Purpose - -The goal of this project is to make the easiest, fastest, and most -painless way of setting up a self-hosted Git service. - -As Gitea is written in Go, it works across **all** the platforms and -architectures that are supported by Go, including Linux, macOS, and -Windows on x86, amd64, ARM and PowerPC architectures. -This project has been -[forked](https://blog.gitea.com/welcome-to-gitea/) from -[Gogs](https://gogs.io) since November of 2016, but a lot has changed. - -For online demonstrations, you can visit [demo.gitea.com](https://demo.gitea.com). - -For accessing free Gitea service (with a limited number of repositories), you can visit [gitea.com](https://gitea.com/user/login). - -To quickly deploy your own dedicated Gitea instance on Gitea Cloud, you can start a free trial at [cloud.gitea.com](https://cloud.gitea.com). - -## Documentation - -You can find comprehensive documentation on our official [documentation website](https://docs.gitea.com/). - -It includes installation, administration, usage, development, contributing guides, and more to help you get started and explore all features effectively. - -If you have any suggestions or would like to contribute to it, you can visit the [documentation repository](https://gitea.com/gitea/docs) - -## Building - -From the root of the source tree, run: - - TAGS="bindata" make build - -or if SQLite support is required: - - TAGS="bindata sqlite sqlite_unlock_notify" make build - -The `build` target is split into two sub-targets: - -- `make backend` which requires [Go Stable](https://go.dev/dl/), the required version is defined in [go.mod](/go.mod). -- `make frontend` which requires [Node.js LTS](https://nodejs.org/en/download/) or greater. - -Internet connectivity is required to download the go and npm modules. When building from the official source tarballs which include pre-built frontend files, the `frontend` target will not be triggered, making it possible to build without Node.js. - -More info: https://docs.gitea.com/installation/install-from-source - -## Using - -After building, a binary file named `gitea` will be generated in the root of the source tree by default. To run it, use: - - ./gitea web - -> [!NOTE] -> If you're interested in using our APIs, we have experimental support with [documentation](https://docs.gitea.com/api). - -## Contributing - -Expected workflow is: Fork -> Patch -> Push -> Pull Request - -> [!NOTE] -> -> 1. **YOU MUST READ THE [CONTRIBUTORS GUIDE](CONTRIBUTING.md) BEFORE STARTING TO WORK ON A PULL REQUEST.** -> 2. If you have found a vulnerability in the project, please write privately to **security@gitea.io**. Thanks! - -## Translating - -[![Crowdin](https://badges.crowdin.net/gitea/localized.svg)](https://translate.gitea.com) - -Translations are done through [Crowdin](https://translate.gitea.com). If you want to translate to a new language ask one of the managers in the Crowdin project to add a new language there. - -You can also just create an issue for adding a language or ask on discord on the #translation channel. If you need context or find some translation issues, you can leave a comment on the string or ask on Discord. For general translation questions there is a section in the docs. Currently a bit empty but we hope to fill it as questions pop up. - -Get more information from [documentation](https://docs.gitea.com/contributing/localization). - -## Official and Third-Party Projects - -We provide an official [go-sdk](https://gitea.com/gitea/go-sdk), a CLI tool called [tea](https://gitea.com/gitea/tea) and an [action runner](https://gitea.com/gitea/act_runner) for Gitea Action. - -We maintain a list of Gitea-related projects at [gitea/awesome-gitea](https://gitea.com/gitea/awesome-gitea), where you can discover more third-party projects, including SDKs, plugins, themes, and more. - -## Communication - -[![](https://img.shields.io/discord/322538954119184384.svg?logo=discord&logoColor=white&label=Discord&color=5865F2)](https://discord.gg/Gitea "Join the Discord chat at https://discord.gg/Gitea") - -If you have questions that are not covered by the [documentation](https://docs.gitea.com/), you can get in contact with us on our [Discord server](https://discord.gg/Gitea) or create a post in the [discourse forum](https://forum.gitea.com/). - -## Authors - -- [Maintainers](https://github.com/orgs/go-gitea/people) -- [Contributors](https://github.com/go-gitea/gitea/graphs/contributors) -- [Translators](options/locale/TRANSLATORS) - -## Backers - -Thank you to all our backers! πŸ™ [[Become a backer](https://opencollective.com/gitea#backer)] - - - -## Sponsors - -Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/gitea#sponsor)] - - - - - - - - - - - - -## FAQ - -**How do you pronounce Gitea?** - -Gitea is pronounced [/Ι‘Ιͺ’ti:/](https://youtu.be/EM71-2uDAoY) as in "gi-tea" with a hard g. - -**Why is this not hosted on a Gitea instance?** - -We're [working on it](https://github.com/go-gitea/gitea/issues/1029). - -**Where can I find the security patches?** - -In the [release log](https://github.com/go-gitea/gitea/releases) or the [change log](https://github.com/go-gitea/gitea/blob/main/CHANGELOG.md), search for the keyword `SECURITY` to find the security patches. - -## License - -This project is licensed under the MIT License. -See the [LICENSE](https://github.com/go-gitea/gitea/blob/main/LICENSE) file -for the full license text. - -## Further information - -
-Looking for an overview of the interface? Check it out! - -|![Dashboard](https://dl.gitea.com/screenshots/home_timeline.png)|![User Profile](https://dl.gitea.com/screenshots/user_profile.png)|![Global Issues](https://dl.gitea.com/screenshots/global_issues.png)| -|:---:|:---:|:---:| -|![Branches](https://dl.gitea.com/screenshots/branches.png)|![Web Editor](https://dl.gitea.com/screenshots/web_editor.png)|![Activity](https://dl.gitea.com/screenshots/activity.png)| -|![New Migration](https://dl.gitea.com/screenshots/migration.png)|![Migrating](https://dl.gitea.com/screenshots/migration.gif)|![Pull Request View](https://image.ibb.co/e02dSb/6.png)| -|![Pull Request Dark](https://dl.gitea.com/screenshots/pull_requests_dark.png)|![Diff Review Dark](https://dl.gitea.com/screenshots/review_dark.png)|![Diff Dark](https://dl.gitea.com/screenshots/diff_dark.png)| - -
+Initial commit From be0c69bff64c7412f78d8996a99c766032d972cb Mon Sep 17 00:00:00 2001 From: maias Date: Fri, 21 Feb 2025 20:02:08 +0200 Subject: [PATCH 18/89] Add newfile.txt --- newfile.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 newfile.txt diff --git a/newfile.txt b/newfile.txt new file mode 100644 index 0000000000000..e69de29bb2d1d From e5d1675905a6f0bb56ea6251899ec6f7dba24768 Mon Sep 17 00:00:00 2001 From: maias Date: Sun, 23 Feb 2025 19:32:10 +0200 Subject: [PATCH 19/89] Workflow build enviroment --- .github/workflows/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a1e692f5f09fa..7d627f048fb30 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,6 +24,12 @@ jobs: - name: Install dependencies run: | go mod tidy + # Step 4: Run Go Linter (golangci-lint) + - name: Run Go Linter + uses: golangci/golangci-lint-action@v4 + with: + version: latest + args: --timeout=5m From 3f6979da3cfb1c834d70b2c866f254c98998d717 Mon Sep 17 00:00:00 2001 From: maias Date: Sun, 23 Feb 2025 19:34:05 +0200 Subject: [PATCH 20/89] Workflow build enviroment --- .github/workflows/build.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7d627f048fb30..02d5793d0dc31 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,12 +24,7 @@ jobs: - name: Install dependencies run: | go mod tidy - # Step 4: Run Go Linter (golangci-lint) - - name: Run Go Linter - uses: golangci/golangci-lint-action@v4 - with: - version: latest - args: --timeout=5m + From 86daffdc0c1ed64fcefb1c12fc881de6fc0ad2be Mon Sep 17 00:00:00 2001 From: maias Date: Sun, 23 Feb 2025 19:38:58 +0200 Subject: [PATCH 21/89] Workflow build enviroment --- .github/workflows/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 02d5793d0dc31..42a2a05f929b9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,6 +24,12 @@ jobs: - name: Install dependencies run: | go mod tidy + # Step 4: Run Go Linter (golangci-lint) + - name: Run Go Linter + uses: golangci/golangci-lint-action@v4 + with: + version: latest + args: --timeout=5m From fc7b2a1af4403f61748b4aff0310b87e060706dd Mon Sep 17 00:00:00 2001 From: maias Date: Sun, 23 Feb 2025 19:42:02 +0200 Subject: [PATCH 22/89] Workflow build enviroment --- .github/workflows/build.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 42a2a05f929b9..60160495e127e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,12 +24,7 @@ jobs: - name: Install dependencies run: | go mod tidy - # Step 4: Run Go Linter (golangci-lint) - - name: Run Go Linter - uses: golangci/golangci-lint-action@v4 - with: - version: latest - args: --timeout=5m + From f6c193e8a7073f5ff8d7a0eb72d254e5b2a667be Mon Sep 17 00:00:00 2001 From: maias Date: Sun, 23 Feb 2025 19:48:13 +0200 Subject: [PATCH 23/89] Workflow build enviroment --- .github/workflows/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 60160495e127e..0ab91604247d1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,6 +24,12 @@ jobs: - name: Install dependencies run: | go mod tidy + # Step 4: Run Go Linter (golangci-lint) + - name: Run Go Linter + uses: golangci/golangci-lint-action@v4 + with: + version: latest + args: --timeout=5m From 42b182ffffae0ac6215e3208775e140cd074cd2c Mon Sep 17 00:00:00 2001 From: maias Date: Sun, 23 Feb 2025 19:57:36 +0200 Subject: [PATCH 24/89] Workflow build enviroment --- .github/workflows/build.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0ab91604247d1..f339d4be56067 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,14 +26,7 @@ jobs: go mod tidy # Step 4: Run Go Linter (golangci-lint) - name: Run Go Linter - uses: golangci/golangci-lint-action@v4 - with: - version: latest - args: --timeout=5m - - - - + run: golangci-lint run --disable-all -E gofmt -E govet --timeout=5m docker: runs-on: ubuntu-latest From 85b1a4441165493a35364fcbd9741b6d49a110ae Mon Sep 17 00:00:00 2001 From: maias Date: Sun, 23 Feb 2025 20:00:47 +0200 Subject: [PATCH 25/89] Workflow build enviroment --- .github/workflows/build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f339d4be56067..47f673784fe44 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,6 +25,11 @@ jobs: run: | go mod tidy # Step 4: Run Go Linter (golangci-lint) + - name: Install golangci-lint + run: | + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.2 + echo "$(go env GOPATH)/bin" >> $GITHUB_PATH + - name: Run Go Linter run: golangci-lint run --disable-all -E gofmt -E govet --timeout=5m From 73bf86f0862850ef425174f784e7b158ade88aa1 Mon Sep 17 00:00:00 2001 From: maias Date: Sun, 23 Feb 2025 20:04:18 +0200 Subject: [PATCH 26/89] Workflow build enviroment --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 47f673784fe44..379c0733ba6b4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,7 +30,7 @@ jobs: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.2 echo "$(go env GOPATH)/bin" >> $GITHUB_PATH - - name: Run Go Linter + - name: Run golangci-lint run: golangci-lint run --disable-all -E gofmt -E govet --timeout=5m docker: From 0aaa0785990393746bd262dad86c2fd275c25d15 Mon Sep 17 00:00:00 2001 From: maias Date: Sun, 23 Feb 2025 20:13:58 +0200 Subject: [PATCH 27/89] Workflow build enviroment --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 379c0733ba6b4..47d89216d42ec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,8 +27,8 @@ jobs: # Step 4: Run Go Linter (golangci-lint) - name: Install golangci-lint run: | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.2 - echo "$(go env GOPATH)/bin" >> $GITHUB_PATH + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.2 + echo "$(go env GOPATH)/bin" >> $GITHUB_PATH - name: Run golangci-lint run: golangci-lint run --disable-all -E gofmt -E govet --timeout=5m From 5c6339c52d3ad5abe92645f1c879e0699ff173a7 Mon Sep 17 00:00:00 2001 From: maias Date: Sun, 23 Feb 2025 20:18:09 +0200 Subject: [PATCH 28/89] Workflow build enviroment --- .golangci.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index c39d7ac5f2f5b..b2c8e25473803 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -20,7 +20,7 @@ linters: - staticcheck - stylecheck - tenv - - testifylint + - typecheck - unconvert - unused @@ -35,11 +35,7 @@ output: sort-order: [file] show-stats: true -linters-settings: - testifylint: - disable: - - go-require - - require-error + stylecheck: checks: ["all", "-ST1005", "-ST1003"] nakedret: From 167e8fd3007d4be634595621040212245ee3f1d4 Mon Sep 17 00:00:00 2001 From: maias Date: Sun, 23 Feb 2025 20:29:03 +0200 Subject: [PATCH 29/89] Workflow build enviroment --- .github/workflows/build.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 47d89216d42ec..78124a45361e4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,14 @@ jobs: uses: actions/setup-go@v2 with: go-version: '1.24.0' # Use the Go version that Gitea supports - + # Step 3: Cache Go modules to speed up builds + - name: Cache Go modules + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- # Step 3: Install dependencies - name: Install dependencies run: | From a6636e10014a6f99af507ce5de64150de84dd5b7 Mon Sep 17 00:00:00 2001 From: maias Date: Sun, 23 Feb 2025 20:58:31 +0200 Subject: [PATCH 30/89] Workflow build enviroment --- .github/workflows/build.yml | 27 ++++++++++----------------- .golangci.yml | 8 +++++++- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 78124a45361e4..4c35549521d11 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,26 +19,19 @@ jobs: uses: actions/setup-go@v2 with: go-version: '1.24.0' # Use the Go version that Gitea supports - # Step 3: Cache Go modules to speed up builds - - name: Cache Go modules - uses: actions/cache@v2 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- + # Step 3: Install dependencies - name: Install dependencies - run: | - go mod tidy - # Step 4: Run Go Linter (golangci-lint) - - name: Install golangci-lint - run: | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.2 - echo "$(go env GOPATH)/bin" >> $GITHUB_PATH + run: go mod download + + - name: Run unit tests + run: go test ./... -v + continue-on-error: true - - name: Run golangci-lint - run: golangci-lint run --disable-all -E gofmt -E govet --timeout=5m + - name: Run linting + run: | + go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest + golangci-lint run docker: runs-on: ubuntu-latest diff --git a/.golangci.yml b/.golangci.yml index b2c8e25473803..67560db4b902c 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -20,7 +20,7 @@ linters: - staticcheck - stylecheck - tenv - + - testifylint - typecheck - unconvert - unused @@ -35,6 +35,12 @@ output: sort-order: [file] show-stats: true +linters-settings: + testifylint: + disable: + - go-require + - require-error + stylecheck: checks: ["all", "-ST1005", "-ST1003"] From 83a36b306ae8d2ef3240ec8d0a070d9916a6012e Mon Sep 17 00:00:00 2001 From: maias Date: Sun, 23 Feb 2025 21:12:22 +0200 Subject: [PATCH 31/89] Workflow build enviroment --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4c35549521d11..2b8b0c2ebae49 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ jobs: # Step 3: Install dependencies - name: Install dependencies - run: go mod download + run: go mod tidy - name: Run unit tests run: go test ./... -v @@ -32,6 +32,7 @@ jobs: run: | go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest golangci-lint run + continue-on-error: true docker: runs-on: ubuntu-latest From 3c71ef6d4b8be40d2f79fc785a0f8d4b78a24637 Mon Sep 17 00:00:00 2001 From: maias Date: Tue, 25 Feb 2025 10:48:47 +0200 Subject: [PATCH 32/89] Workflow build enviroment --- .github/workflows/run-gitea-container.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/run-gitea-container.yml diff --git a/.github/workflows/run-gitea-container.yml b/.github/workflows/run-gitea-container.yml new file mode 100644 index 0000000000000..3026618ccf666 --- /dev/null +++ b/.github/workflows/run-gitea-container.yml @@ -0,0 +1,19 @@ +version: '3.8' + +services: + gitea: + image: maias816/gitea:latest # Use the image you built in GitHub Actions + container_name: gitea + environment: + - USER_UID=1000 + - USER_GID=1000 + - GITEA__database__DB_TYPE=sqlite3 + ports: + - "3000:3000" # Gitea Web UI + - "2222:22" # Gitea SSH access + volumes: + - gitea_data:/data # Persist data so it doesn't get lost after restart + restart: always + +volumes: + gitea_data: From 66e1104f72fc090c12b5108e2ca494183e98df70 Mon Sep 17 00:00:00 2001 From: maias Date: Tue, 25 Feb 2025 12:07:17 +0200 Subject: [PATCH 33/89] Workflow build enviroment --- .github/workflows/integration-tests.yml | 50 +++++++++++++++++++++++ .github/workflows/run-gitea-container.yml | 19 --------- 2 files changed, 50 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/integration-tests.yml delete mode 100644 .github/workflows/run-gitea-container.yml diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml new file mode 100644 index 0000000000000..e1aace6c5ccc2 --- /dev/null +++ b/.github/workflows/integration-tests.yml @@ -0,0 +1,50 @@ +name: Gitea CI Workflow + +on: + push: + branches: + - dev # Run when pushing to 'dev' + pull_request: + branches: + - dev # Run tests when a PR is opened or updated targeting 'dev' + +jobs: + integration-tests: + runs-on: ubuntu-latest + needs: docker # Run after the Docker job finishes + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Docker + uses: docker/setup-buildx-action@v2 + + - name: Pull latest Gitea image + run: docker pull maias816/gitea:latest + + - name: Start Gitea with Docker Compose + run: docker-compose up -d + + # Wait for Gitea to start + - name: Wait for Gitea to start + run: sleep 10 # Adjust time if needed + + # βœ… Clone API tests repository + - name: Clone API Tests Repository + run: git clone https://github.com/maias1907/gitea-Automation-Testing-Project.git + + # βœ… Install dependencies (if needed) + - name: Install API test dependencies + run: | + cd gitea-Automation-Testing-Project + + + # βœ… Run API tests + - name: Run API Tests + run: | + cd gitea-Automation-Testing-Project + mvn -q clean test -Dtest=**/APITests/* + + - name: Stop Gitea + run: docker-compose down diff --git a/.github/workflows/run-gitea-container.yml b/.github/workflows/run-gitea-container.yml deleted file mode 100644 index 3026618ccf666..0000000000000 --- a/.github/workflows/run-gitea-container.yml +++ /dev/null @@ -1,19 +0,0 @@ -version: '3.8' - -services: - gitea: - image: maias816/gitea:latest # Use the image you built in GitHub Actions - container_name: gitea - environment: - - USER_UID=1000 - - USER_GID=1000 - - GITEA__database__DB_TYPE=sqlite3 - ports: - - "3000:3000" # Gitea Web UI - - "2222:22" # Gitea SSH access - volumes: - - gitea_data:/data # Persist data so it doesn't get lost after restart - restart: always - -volumes: - gitea_data: From 874a21c463435eaf5795647b4baf1f8c851c47fd Mon Sep 17 00:00:00 2001 From: maias Date: Tue, 25 Feb 2025 12:11:25 +0200 Subject: [PATCH 34/89] Workflow build enviroment --- .github/workflows/integration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index e1aace6c5ccc2..481954fb59088 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -11,7 +11,7 @@ on: jobs: integration-tests: runs-on: ubuntu-latest - needs: docker # Run after the Docker job finishes + steps: - name: Checkout repository From af809e51d8b9e23fd29a33c0b030a4aa03324c46 Mon Sep 17 00:00:00 2001 From: maias Date: Tue, 25 Feb 2025 12:13:48 +0200 Subject: [PATCH 35/89] Workflow build enviroment --- .github/workflows/integration-tests.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 481954fb59088..08691d40a4403 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -11,7 +11,7 @@ on: jobs: integration-tests: runs-on: ubuntu-latest - + needs: docker # Ensure the Docker job runs first steps: - name: Checkout repository @@ -20,12 +20,18 @@ jobs: - name: Set up Docker uses: docker/setup-buildx-action@v2 + - name: Install Docker Compose + run: | + sudo apt-get update + sudo apt-get install -y docker-compose + - name: Pull latest Gitea image run: docker pull maias816/gitea:latest - name: Start Gitea with Docker Compose run: docker-compose up -d + # Wait for Gitea to start - name: Wait for Gitea to start run: sleep 10 # Adjust time if needed From f4c22da1e872428ccdf488eaaf6734e826321f43 Mon Sep 17 00:00:00 2001 From: maias Date: Tue, 25 Feb 2025 12:25:04 +0200 Subject: [PATCH 36/89] Workflow build enviroment --- .github/workflows/integration-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 08691d40a4403..315292a25dd66 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -54,3 +54,4 @@ jobs: - name: Stop Gitea run: docker-compose down +#Ω‡ From 18688d3e003d6b01c49db9e1323dd43890ebdcf1 Mon Sep 17 00:00:00 2001 From: maias Date: Tue, 25 Feb 2025 12:26:16 +0200 Subject: [PATCH 37/89] Workflow build enviroment --- .github/workflows/integration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 315292a25dd66..33741521bf31e 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -11,7 +11,7 @@ on: jobs: integration-tests: runs-on: ubuntu-latest - needs: docker # Ensure the Docker job runs first + steps: - name: Checkout repository From abecd086323bf1348f3516cd3a544ee159d24132 Mon Sep 17 00:00:00 2001 From: maias Date: Tue, 25 Feb 2025 12:30:36 +0200 Subject: [PATCH 38/89] Workflow build enviroment --- .github/workflows/docker-compose.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/docker-compose.yml diff --git a/.github/workflows/docker-compose.yml b/.github/workflows/docker-compose.yml new file mode 100644 index 0000000000000..bb3258c2f8b6c --- /dev/null +++ b/.github/workflows/docker-compose.yml @@ -0,0 +1,19 @@ +version: '3.8' + +services: + gitea: + image: maias816/gitea:latest + container_name: gitea + environment: + - USER_UID=1000 + - USER_GID=1000 + - GITEA__database__DB_TYPE=sqlite3 + ports: + - "3000:3000" # Web UI + - "2222:22" # SSH access + volumes: + - gitea_data:/data + restart: always + +volumes: + gitea_data: From 4385678d1cf8427a59f640f9192871ea3a170a2a Mon Sep 17 00:00:00 2001 From: maias Date: Tue, 25 Feb 2025 12:32:56 +0200 Subject: [PATCH 39/89] Workflow build enviroment --- .github/workflows/integration-tests.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 33741521bf31e..e35d2f05d8581 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -20,10 +20,7 @@ jobs: - name: Set up Docker uses: docker/setup-buildx-action@v2 - - name: Install Docker Compose - run: | - sudo apt-get update - sudo apt-get install -y docker-compose + - name: Pull latest Gitea image run: docker pull maias816/gitea:latest From 35eabb5dbb2687e4c5b5a94a1b95be0fa93787b2 Mon Sep 17 00:00:00 2001 From: maias Date: Tue, 25 Feb 2025 12:34:16 +0200 Subject: [PATCH 40/89] Workflow build enviroment --- .github/workflows/integration-tests.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index e35d2f05d8581..ce7188a5c9d56 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -17,8 +17,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 - - name: Set up Docker - uses: docker/setup-buildx-action@v2 + From 4ac893339fccf99f8645bb58a413b0693e2d8a08 Mon Sep 17 00:00:00 2001 From: maias Date: Tue, 25 Feb 2025 12:35:16 +0200 Subject: [PATCH 41/89] Workflow build enviroment --- .github/workflows/integration-tests.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index ce7188a5c9d56..b1265999e01de 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -24,8 +24,7 @@ jobs: - name: Pull latest Gitea image run: docker pull maias816/gitea:latest - - name: Start Gitea with Docker Compose - run: docker-compose up -d + # Wait for Gitea to start From 2d377376c06c4addc41d78352fdb69e0378d4a0c Mon Sep 17 00:00:00 2001 From: maias Date: Thu, 27 Feb 2025 11:49:20 +0200 Subject: [PATCH 42/89] Workflow build enviroment --- .github/workflows/docker-compose.yml | 31 +++++++++++++++----- docker-compose.yml | 43 ++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 7 deletions(-) create mode 100644 docker-compose.yml diff --git a/.github/workflows/docker-compose.yml b/.github/workflows/docker-compose.yml index bb3258c2f8b6c..88be46b5647e8 100644 --- a/.github/workflows/docker-compose.yml +++ b/.github/workflows/docker-compose.yml @@ -1,19 +1,36 @@ -version: '3.8' +version: '3.7' services: gitea: - image: maias816/gitea:latest + image: gitea/gitea:latest container_name: gitea - environment: - - USER_UID=1000 - - USER_GID=1000 - - GITEA__database__DB_TYPE=sqlite3 + restart: always ports: - "3000:3000" # Web UI - - "2222:22" # SSH access + - "2222:22" # SSH + environment: + - GITEA__security__INSTALL_LOCK=true + - GITEA__database__DB_TYPE=postgres + - GITEA__database__HOST=db:5432 + - GITEA__database__NAME=gitea + - GITEA__database__USER=gitea_user + - GITEA__database__PASSWD=gitea_pass volumes: - gitea_data:/data + depends_on: + - db + + db: + image: postgres:13 + container_name: gitea_db restart: always + environment: + POSTGRES_DB: gitea + POSTGRES_USER: gitea_user + POSTGRES_PASSWORD: gitea_pass + volumes: + - postgres_data:/var/lib/postgresql/data volumes: gitea_data: + postgres_data: diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000000000..ca1809730655e --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,43 @@ +services: + gitea: + image: gitea/gitea:latest + container_name: gitea + ports: + - "3000:3000" + - "22:22" + environment: + - GITEA__database__DB_TYPE=postgres + - GITEA__database__HOST=db:5432 + - GITEA__database__NAME=gitea + - GITEA__database__USER=gitea + - GITEA__database__PASSWD=gitea + depends_on: + - db + - redis + volumes: + - gitea_data:/data + + redis: + image: redis:alpine + + + container_name: redis + volumes: + - redis_data:/data + + db: + image: postgres:alpine + container_name: db + environment: + - POSTGRES_USER=gitea + - POSTGRES_PASSWORD=gitea + - POSTGRES_DB=gitea + volumes: + - db_data:/var/lib/postgresql/data + + + +volumes: + gitea_data: + redis_data: + db_data: From 537828b78f543f29f4114eb6e2f728570f3e8deb Mon Sep 17 00:00:00 2001 From: maias Date: Thu, 27 Feb 2025 12:12:57 +0200 Subject: [PATCH 43/89] Workflow build enviroment --- .github/workflows/docker-compose.yml | 36 ------------- .github/workflows/integration-tests.yml | 69 ++++++++++++++----------- docker-compose.yml | 49 +++++++++--------- 3 files changed, 62 insertions(+), 92 deletions(-) delete mode 100644 .github/workflows/docker-compose.yml diff --git a/.github/workflows/docker-compose.yml b/.github/workflows/docker-compose.yml deleted file mode 100644 index 88be46b5647e8..0000000000000 --- a/.github/workflows/docker-compose.yml +++ /dev/null @@ -1,36 +0,0 @@ -version: '3.7' - -services: - gitea: - image: gitea/gitea:latest - container_name: gitea - restart: always - ports: - - "3000:3000" # Web UI - - "2222:22" # SSH - environment: - - GITEA__security__INSTALL_LOCK=true - - GITEA__database__DB_TYPE=postgres - - GITEA__database__HOST=db:5432 - - GITEA__database__NAME=gitea - - GITEA__database__USER=gitea_user - - GITEA__database__PASSWD=gitea_pass - volumes: - - gitea_data:/data - depends_on: - - db - - db: - image: postgres:13 - container_name: gitea_db - restart: always - environment: - POSTGRES_DB: gitea - POSTGRES_USER: gitea_user - POSTGRES_PASSWORD: gitea_pass - volumes: - - postgres_data:/var/lib/postgresql/data - -volumes: - gitea_data: - postgres_data: diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index b1265999e01de..283a44e14c7df 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,52 +1,59 @@ -name: Gitea CI Workflow +name: Gitea Setup and Testing on: push: branches: - - dev # Run when pushing to 'dev' + - main # Trigger the workflow when changes are pushed to the main branch pull_request: branches: - - dev # Run tests when a PR is opened or updated targeting 'dev' + - main # Trigger the workflow when a PR is opened to the main branch + workflow_dispatch: # Allows manual trigger from the GitHub UI jobs: - integration-tests: + setup-and-test: runs-on: ubuntu-latest + services: + postgres: + image: postgres:13 + options: --health-cmd="pg_isready -U gitea_user" --health-timeout=30s --health-retries=3 + ports: + - 5432:5432 + env: + POSTGRES_DB: gitea + POSTGRES_USER: gitea_user + POSTGRES_PASSWORD: gitea_pass + healthcheck: + test: ["CMD", "pg_isready", "-U", "gitea_user"] + interval: 10s + retries: 5 + timeout: 30s steps: - - name: Checkout repository + - name: Checkout code uses: actions/checkout@v2 + - name: Set up Docker Compose + run: | + sudo apt-get update + sudo apt-get install docker-compose -y + - name: Start Gitea & PostgreSQL using Docker Compose + run: | + docker-compose -f docker-compose.yml up -d - - - - name: Pull latest Gitea image - run: docker pull maias816/gitea:latest - - - - - # Wait for Gitea to start - - name: Wait for Gitea to start - run: sleep 10 # Adjust time if needed - - # βœ… Clone API tests repository - - name: Clone API Tests Repository - run: git clone https://github.com/maias1907/gitea-Automation-Testing-Project.git - - # βœ… Install dependencies (if needed) - - name: Install API test dependencies + - name: Wait for Gitea to be ready run: | - cd gitea-Automation-Testing-Project + sleep 20 # Adjust based on how long it takes for Gitea to fully start + - name: Pull Test Docker Image + run: | + docker pull api_ui_tests:latest # Pull the existing image - # βœ… Run API tests - - name: Run API Tests + - name: Run API and UI Tests run: | - cd gitea-Automation-Testing-Project - mvn -q clean test -Dtest=**/APITests/* + docker run --rm api_ui_tests:latest # Run the tests using the image - - name: Stop Gitea - run: docker-compose down -#Ω‡ + - name: Tear down containers + run: | + docker-compose down diff --git a/docker-compose.yml b/docker-compose.yml index ca1809730655e..a419b358ea865 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,43 +1,42 @@ +version: '3.7' + services: gitea: - image: gitea/gitea:latest + image: gitea/gitea:latest # Gitea Docker image container_name: gitea ports: - - "3000:3000" - - "22:22" + - "3000:3000" # Expose Gitea web interface on port 3000 + - "22:22" # Expose SSH port for Git operations environment: + - USER_UID=1000 + - USER_GID=1000 - GITEA__database__DB_TYPE=postgres - - GITEA__database__HOST=db:5432 + - GITEA__database__HOST=db:5432 # PostgreSQL database service - GITEA__database__NAME=gitea - - GITEA__database__USER=gitea - - GITEA__database__PASSWD=gitea + - GITEA__database__USER=gitea_user + - GITEA__database__PASSWD=gitea_pass + - GITEA__server__DOMAIN=localhost:3000 + - GITEA__server__SSH_PORT=22 depends_on: - db - redis volumes: - - gitea_data:/data - - redis: - image: redis:alpine - - - container_name: redis - volumes: - - redis_data:/data + - ./data:/data # Persistent storage for Gitea data db: - image: postgres:alpine + image: postgres:alpine # PostgreSQL Docker image container_name: db environment: - - POSTGRES_USER=gitea - - POSTGRES_PASSWORD=gitea - POSTGRES_DB=gitea + - POSTGRES_USER=gitea_user + - POSTGRES_PASSWORD=gitea_pass volumes: - - db_data:/var/lib/postgresql/data + - ./db-data:/var/lib/postgresql/data # Persistent storage for database - - -volumes: - gitea_data: - redis_data: - db_data: + redis: + image: redis:alpine # Redis Docker image + container_name: redis + ports: + - "6379:6379" # Expose Redis default port + volumes: + - ./redis-data:/data # Persistent storage for Redis From a55b5ba7173f228038262d6a77b8cd9f6ce27d97 Mon Sep 17 00:00:00 2001 From: maias Date: Thu, 27 Feb 2025 12:15:34 +0200 Subject: [PATCH 44/89] Workflow build enviroment --- .github/workflows/integration-tests.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 283a44e14c7df..91d4124f747f1 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -23,11 +23,7 @@ jobs: POSTGRES_DB: gitea POSTGRES_USER: gitea_user POSTGRES_PASSWORD: gitea_pass - healthcheck: - test: ["CMD", "pg_isready", "-U", "gitea_user"] - interval: 10s - retries: 5 - timeout: 30s + steps: - name: Checkout code From adb9c8f7efdf5664205108bd625d5b6947d9eb28 Mon Sep 17 00:00:00 2001 From: maias Date: Thu, 27 Feb 2025 12:21:03 +0200 Subject: [PATCH 45/89] Workflow build enviroment --- .github/workflows/integration-tests.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 91d4124f747f1..9024330a139d3 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -3,10 +3,10 @@ name: Gitea Setup and Testing on: push: branches: - - main # Trigger the workflow when changes are pushed to the main branch + - dev # Trigger the workflow when changes are pushed to the main branch pull_request: branches: - - main # Trigger the workflow when a PR is opened to the main branch + - dev # Trigger the workflow when a PR is opened to the main branch workflow_dispatch: # Allows manual trigger from the GitHub UI jobs: @@ -24,6 +24,10 @@ jobs: POSTGRES_USER: gitea_user POSTGRES_PASSWORD: gitea_pass + redis: + image: redis:alpine + ports: + - 6379:6379 steps: - name: Checkout code @@ -34,6 +38,10 @@ jobs: sudo apt-get update sudo apt-get install docker-compose -y + - name: Build Test Docker Image + run: | + docker build -t api_ui_tests:latest -f Dockerfile.test . + - name: Start Gitea & PostgreSQL using Docker Compose run: | docker-compose -f docker-compose.yml up -d From de671b3e7c125db26d5122c8b7d7842511a6f6f7 Mon Sep 17 00:00:00 2001 From: maias Date: Thu, 27 Feb 2025 12:25:47 +0200 Subject: [PATCH 46/89] Workflow build enviroment --- .github/workflows/integration-tests.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 9024330a139d3..eca9ed4fafa9b 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -38,9 +38,7 @@ jobs: sudo apt-get update sudo apt-get install docker-compose -y - - name: Build Test Docker Image - run: | - docker build -t api_ui_tests:latest -f Dockerfile.test . + - name: Start Gitea & PostgreSQL using Docker Compose run: | From f63a3eea5b460f9a9e35512a4ed9fc2c42506c5c Mon Sep 17 00:00:00 2001 From: maias Date: Thu, 27 Feb 2025 12:33:10 +0200 Subject: [PATCH 47/89] Workflow build enviroment --- .github/workflows/integration-tests.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index eca9ed4fafa9b..cd2e74b7aaa9d 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -33,21 +33,6 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - - name: Set up Docker Compose - run: | - sudo apt-get update - sudo apt-get install docker-compose -y - - - - - name: Start Gitea & PostgreSQL using Docker Compose - run: | - docker-compose -f docker-compose.yml up -d - - - name: Wait for Gitea to be ready - run: | - sleep 20 # Adjust based on how long it takes for Gitea to fully start - - name: Pull Test Docker Image run: | docker pull api_ui_tests:latest # Pull the existing image From 12a70155089cd15330ce04ca701ad8b24bdf38da Mon Sep 17 00:00:00 2001 From: maias Date: Thu, 27 Feb 2025 12:36:44 +0200 Subject: [PATCH 48/89] Workflow build enviroment --- .github/workflows/integration-tests.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index cd2e74b7aaa9d..33e2412d08fb0 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -33,10 +33,15 @@ jobs: - name: Checkout code uses: actions/checkout@v2 + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} # GitHub Secrets for Docker username + password: ${{ secrets.DOCKER_PASSWORD }} # GitHub Secrets for Docker password + - name: Pull Test Docker Image run: | docker pull api_ui_tests:latest # Pull the existing image - - name: Run API and UI Tests run: | docker run --rm api_ui_tests:latest # Run the tests using the image From 2487b3faf8c2b32715b09777c233e4cb1e321848 Mon Sep 17 00:00:00 2001 From: maias Date: Thu, 27 Feb 2025 13:01:44 +0200 Subject: [PATCH 49/89] Workflow build enviroment --- .github/workflows/integration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 33e2412d08fb0..611570a4dd940 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -41,7 +41,7 @@ jobs: - name: Pull Test Docker Image run: | - docker pull api_ui_tests:latest # Pull the existing image + docker pull api_ui_tests:latest # Pull the existing image from docker hub - name: Run API and UI Tests run: | docker run --rm api_ui_tests:latest # Run the tests using the image From e6a6a18e4965c51d94d4e14a337c2dbcff470360 Mon Sep 17 00:00:00 2001 From: maias Date: Thu, 27 Feb 2025 13:05:32 +0200 Subject: [PATCH 50/89] Workflow build enviroment --- .github/workflows/integration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 611570a4dd940..826d1061a7cfd 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -41,7 +41,7 @@ jobs: - name: Pull Test Docker Image run: | - docker pull api_ui_tests:latest # Pull the existing image from docker hub + docker pull api_ui_tests:latest # Pull the existing image from docker hub1 - name: Run API and UI Tests run: | docker run --rm api_ui_tests:latest # Run the tests using the image From 73de2a5e7275a26f2d3adeb4c2e020761da9cffe Mon Sep 17 00:00:00 2001 From: maias Date: Thu, 27 Feb 2025 13:15:40 +0200 Subject: [PATCH 51/89] Workflow build enviroment --- .github/workflows/integration-tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 826d1061a7cfd..10d3685925b61 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -41,7 +41,8 @@ jobs: - name: Pull Test Docker Image run: | - docker pull api_ui_tests:latest # Pull the existing image from docker hub1 + docker pull maias816/api_ui_tests:latest + # Pull the existing image from docker hub1 - name: Run API and UI Tests run: | docker run --rm api_ui_tests:latest # Run the tests using the image From 5c83b37719e3dbbab33c3183554b2a488c2c801d Mon Sep 17 00:00:00 2001 From: maias Date: Thu, 27 Feb 2025 13:18:43 +0200 Subject: [PATCH 52/89] Workflow build enviroment --- .github/workflows/integration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 10d3685925b61..55e12344bf407 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -45,7 +45,7 @@ jobs: # Pull the existing image from docker hub1 - name: Run API and UI Tests run: | - docker run --rm api_ui_tests:latest # Run the tests using the image + docker run --rm maias816/api_ui_tests:latest # Run the tests using the image - name: Tear down containers run: | From a5d80995ddd1f7c33312e1646760122fa1dcb675 Mon Sep 17 00:00:00 2001 From: maias Date: Thu, 27 Feb 2025 13:46:47 +0200 Subject: [PATCH 53/89] Workflow build enviroment --- .github/workflows/integration-tests.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 55e12344bf407..7fd101b96d326 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -47,6 +47,4 @@ jobs: run: | docker run --rm maias816/api_ui_tests:latest # Run the tests using the image - - name: Tear down containers - run: | - docker-compose down + From b67b2ef4279f8ce29faadab8c25bf51c022f5212 Mon Sep 17 00:00:00 2001 From: maias Date: Sun, 2 Mar 2025 19:25:37 +0200 Subject: [PATCH 54/89] Workflow build enviroment --- .github/workflows/integration-tests.yml | 4 ++-- docker-compose.yml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 7fd101b96d326..26d878c84db2d 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -3,10 +3,10 @@ name: Gitea Setup and Testing on: push: branches: - - dev # Trigger the workflow when changes are pushed to the main branch + - dev # Trigger the workflow when changes are pushed to the dev branch pull_request: branches: - - dev # Trigger the workflow when a PR is opened to the main branch + - dev # Trigger the workflow when a PR is opened to the dev branch workflow_dispatch: # Allows manual trigger from the GitHub UI jobs: diff --git a/docker-compose.yml b/docker-compose.yml index a419b358ea865..5ed0c7a6435f6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -36,6 +36,7 @@ services: redis: image: redis:alpine # Redis Docker image container_name: redis + ports: - "6379:6379" # Expose Redis default port volumes: From 4adf85342af6f4806d149116da595d71a83fa3f2 Mon Sep 17 00:00:00 2001 From: maias Date: Sun, 2 Mar 2025 20:12:52 +0200 Subject: [PATCH 55/89] build --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2b8b0c2ebae49..4bab02e22b22a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -59,7 +59,7 @@ jobs: run: | docker build -t maias816/gitea:latest . - # Step 5: Push the Docker image to Docker Hub + # Step 5: Push the Docker image to Docker Hub ok - name: Push Docker image run: | docker push maias816/gitea:latest From 18c3e464fb1da4f461427a9604f016075593b246 Mon Sep 17 00:00:00 2001 From: maias Date: Sun, 2 Mar 2025 20:46:51 +0200 Subject: [PATCH 56/89] build --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4bab02e22b22a..2b8b0c2ebae49 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -59,7 +59,7 @@ jobs: run: | docker build -t maias816/gitea:latest . - # Step 5: Push the Docker image to Docker Hub ok + # Step 5: Push the Docker image to Docker Hub - name: Push Docker image run: | docker push maias816/gitea:latest From 8f7fdf019172c71215b68758cc8405d08cef3e87 Mon Sep 17 00:00:00 2001 From: maias Date: Sun, 2 Mar 2025 20:53:35 +0200 Subject: [PATCH 57/89] build --- .github/workflows/integration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 26d878c84db2d..51601b5b6a2d1 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -45,6 +45,6 @@ jobs: # Pull the existing image from docker hub1 - name: Run API and UI Tests run: | - docker run --rm maias816/api_ui_tests:latest # Run the tests using the image + docker run --rm maias816/api_ui_tests:latest # Run the tests using the image ok From d59c57d26d19b42f573f2fbf85517a54224d51b7 Mon Sep 17 00:00:00 2001 From: maias Date: Sun, 2 Mar 2025 21:25:36 +0200 Subject: [PATCH 58/89] build --- .github/workflows/integration-tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 51601b5b6a2d1..16f518a56ef71 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,9 +1,7 @@ name: Gitea Setup and Testing on: - push: - branches: - - dev # Trigger the workflow when changes are pushed to the dev branch + pull_request: branches: - dev # Trigger the workflow when a PR is opened to the dev branch @@ -45,6 +43,8 @@ jobs: # Pull the existing image from docker hub1 - name: Run API and UI Tests run: | - docker run --rm maias816/api_ui_tests:latest # Run the tests using the image ok + docker run --rm maias816/api_ui_tests:latest + + From f1fb1c9d18f8cce06d26c2ab1457b83a3947575b Mon Sep 17 00:00:00 2001 From: maias Date: Sun, 2 Mar 2025 21:31:27 +0200 Subject: [PATCH 59/89] build --- .github/workflows/integration-tests.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 16f518a56ef71..cfd2d09e23cb8 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,11 +1,10 @@ name: Gitea Setup and Testing on: - pull_request: branches: - dev # Trigger the workflow when a PR is opened to the dev branch - workflow_dispatch: # Allows manual trigger from the GitHub UI + #workflow_dispatch: # Allows manual trigger from the GitHub UI jobs: setup-and-test: From 29f1222feb7aae5e1f651cbdf53ec204046ed48f Mon Sep 17 00:00:00 2001 From: maias Date: Sun, 2 Mar 2025 21:44:10 +0200 Subject: [PATCH 60/89] build --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2b8b0c2ebae49..5c460aba4a7c0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,7 +3,7 @@ name: Gitea CI Workflow on: push: branches: - - dev # Trigger on push to the dev branch + - feature-branch # Trigger on push to the dev branch jobs: build: From fd5f7264279761834e7c12310af57cbe61b2fa21 Mon Sep 17 00:00:00 2001 From: maias Date: Sun, 2 Mar 2025 21:47:08 +0200 Subject: [PATCH 61/89] build --- .github/workflows/integration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index cfd2d09e23cb8..0e1dce6a8a66b 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -3,7 +3,7 @@ name: Gitea Setup and Testing on: pull_request: branches: - - dev # Trigger the workflow when a PR is opened to the dev branch + - feature-branch # Trigger the workflow when a PR is opened to the dev branch #workflow_dispatch: # Allows manual trigger from the GitHub UI jobs: From 34ce384aaadd65754ea82eaca160c703dfea6069 Mon Sep 17 00:00:00 2001 From: maias Date: Sun, 2 Mar 2025 21:55:11 +0200 Subject: [PATCH 62/89] build --- .github/workflows/integration-tests.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 0e1dce6a8a66b..bb59185909042 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,10 +1,13 @@ name: Gitea Setup and Testing on: + push: + branches: + - feature-branch pull_request: branches: - feature-branch # Trigger the workflow when a PR is opened to the dev branch - #workflow_dispatch: # Allows manual trigger from the GitHub UI + workflow_dispatch: # Allows manual trigger from the GitHub UI jobs: setup-and-test: From 39b1acbb9564813be6f0e87f8c8b576aa40786b5 Mon Sep 17 00:00:00 2001 From: maias Date: Mon, 3 Mar 2025 05:04:12 +0200 Subject: [PATCH 63/89] build --- .github/workflows/integration-tests.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index bb59185909042..7ecfe6ae634e9 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -47,6 +47,11 @@ jobs: run: | docker run --rm maias816/api_ui_tests:latest + - name: Build and test Docker image + run: | + docker pull maias816/code-formatter:latest + docker run maias816/code-formatter:latest + From a6179f2a7fa08df021c3c91f245c5c7ace6511f1 Mon Sep 17 00:00:00 2001 From: maias Date: Mon, 3 Mar 2025 05:18:03 +0200 Subject: [PATCH 64/89] build --- .github/workflows/integration-tests.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 7ecfe6ae634e9..93652c014bc6c 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -39,7 +39,7 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} # GitHub Secrets for Docker username password: ${{ secrets.DOCKER_PASSWORD }} # GitHub Secrets for Docker password - - name: Pull Test Docker Image + - name: Pull Test Docker Image for API tests run: | docker pull maias816/api_ui_tests:latest # Pull the existing image from docker hub1 @@ -47,9 +47,11 @@ jobs: run: | docker run --rm maias816/api_ui_tests:latest - - name: Build and test Docker image + - name: pull feature image run: | docker pull maias816/code-formatter:latest + - name : run feature tests + run: | docker run maias816/code-formatter:latest From ebd5fbb033e39803ac73d9cfe5f68f1cf52a1bc5 Mon Sep 17 00:00:00 2001 From: maias Date: Mon, 3 Mar 2025 05:28:22 +0200 Subject: [PATCH 65/89] build --- .github/workflows/integration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 93652c014bc6c..a88f46df60444 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -47,7 +47,7 @@ jobs: run: | docker run --rm maias816/api_ui_tests:latest - - name: pull feature image + - name: pull feature image # pull and feature image run: | docker pull maias816/code-formatter:latest - name : run feature tests From 87c0412fe03ef2b3f61ff3ad99986e10618bbcd4 Mon Sep 17 00:00:00 2001 From: maias Date: Mon, 3 Mar 2025 05:38:24 +0200 Subject: [PATCH 66/89] build --- .github/workflows/integration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index a88f46df60444..e6e394dbeec02 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -47,7 +47,7 @@ jobs: run: | docker run --rm maias816/api_ui_tests:latest - - name: pull feature image # pull and feature image + - name: pull feature image # pull and feature image ok run: | docker pull maias816/code-formatter:latest - name : run feature tests From b7ae2d5b09c218ea9204522a6c47262789e72493 Mon Sep 17 00:00:00 2001 From: maias Date: Mon, 3 Mar 2025 12:57:21 +0200 Subject: [PATCH 67/89] build --- .github/workflows/integration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index e6e394dbeec02..99e14736ed0cf 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -47,7 +47,7 @@ jobs: run: | docker run --rm maias816/api_ui_tests:latest - - name: pull feature image # pull and feature image ok + - name: pull feature image # pull and feature image ok k run: | docker pull maias816/code-formatter:latest - name : run feature tests From 945754c6207c4f42de1ed05b66b3fe7381a2a47b Mon Sep 17 00:00:00 2001 From: maias Date: Tue, 4 Mar 2025 10:51:06 +0200 Subject: [PATCH 68/89] build --- .github/workflows/integration-tests.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 99e14736ed0cf..d215be5c22338 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -47,12 +47,12 @@ jobs: run: | docker run --rm maias816/api_ui_tests:latest - - name: pull feature image # pull and feature image ok k - run: | - docker pull maias816/code-formatter:latest - - name : run feature tests - run: | - docker run maias816/code-formatter:latest + # - name: pull feature image # pull and feature image ok k + # run: | + # docker pull maias816/code-formatter:latest + # - name : run feature tests + # run: | + # docker run maias816/code-formatter:latest From 856428ca399de6377b7d94a31892a55ed5710af3 Mon Sep 17 00:00:00 2001 From: maias Date: Tue, 4 Mar 2025 14:52:41 +0200 Subject: [PATCH 69/89] build --- .github/workflows/build.yml | 2 +- .github/workflows/integration-tests.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5c460aba4a7c0..306c9c1303b83 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,7 +3,7 @@ name: Gitea CI Workflow on: push: branches: - - feature-branch # Trigger on push to the dev branch + - featureBranch # Trigger on push to the dev branch jobs: build: diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index d215be5c22338..a858f6e65f04a 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -3,10 +3,10 @@ name: Gitea Setup and Testing on: push: branches: - - feature-branch + - featureBranch pull_request: branches: - - feature-branch # Trigger the workflow when a PR is opened to the dev branch + - featureBranch # Trigger the workflow when a PR is opened to the dev branch workflow_dispatch: # Allows manual trigger from the GitHub UI jobs: From 8d5ed8dfc23d5563cb69602e6b5905e8086246b6 Mon Sep 17 00:00:00 2001 From: maias Date: Tue, 4 Mar 2025 15:09:06 +0200 Subject: [PATCH 70/89] build --- .github/workflows/integration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index a858f6e65f04a..cbea73d91f79f 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -6,7 +6,7 @@ on: - featureBranch pull_request: branches: - - featureBranch # Trigger the workflow when a PR is opened to the dev branch + - featureBranch # Trigger the workflow when a PR is opened to the dev branch ok workflow_dispatch: # Allows manual trigger from the GitHub UI jobs: From cb4dac593fb0e43908ba7f9973639cd81db847dc Mon Sep 17 00:00:00 2001 From: maias Date: Tue, 4 Mar 2025 15:43:23 +0200 Subject: [PATCH 71/89] build --- .github/workflows/build.yml | 3 ++- .github/workflows/integration-tests.yml | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 306c9c1303b83..c2efefcfafd82 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,7 +3,8 @@ name: Gitea CI Workflow on: push: branches: - - featureBranch # Trigger on push to the dev branch + - feature_branch + # Trigger on push to the dev branch jobs: build: diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index cbea73d91f79f..b5baabccb5dce 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -3,10 +3,12 @@ name: Gitea Setup and Testing on: push: branches: - - featureBranch + - feature_branch + pull_request: branches: - - featureBranch # Trigger the workflow when a PR is opened to the dev branch ok + - feature_branch + # Trigger the workflow when a PR is opened to the dev branch ok workflow_dispatch: # Allows manual trigger from the GitHub UI jobs: From 206b2ba52c214ee5571386b784a3baa79efae81d Mon Sep 17 00:00:00 2001 From: maias Date: Thu, 6 Mar 2025 09:59:09 +0200 Subject: [PATCH 72/89] build --- .github/workflows/integration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index b5baabccb5dce..e5a62a63b3ba3 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -44,7 +44,7 @@ jobs: - name: Pull Test Docker Image for API tests run: | docker pull maias816/api_ui_tests:latest - # Pull the existing image from docker hub1 + # Pull the existing image from docker hub - name: Run API and UI Tests run: | docker run --rm maias816/api_ui_tests:latest From 1ab4b50d293c53c22244f3e6b0d3a0c8d5e6953f Mon Sep 17 00:00:00 2001 From: maias Date: Thu, 6 Mar 2025 10:04:28 +0200 Subject: [PATCH 73/89] build --- .github/workflows/integration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index e5a62a63b3ba3..b5baabccb5dce 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -44,7 +44,7 @@ jobs: - name: Pull Test Docker Image for API tests run: | docker pull maias816/api_ui_tests:latest - # Pull the existing image from docker hub + # Pull the existing image from docker hub1 - name: Run API and UI Tests run: | docker run --rm maias816/api_ui_tests:latest From 5dfd155a3a99a5c37f88beefdee397a631d46cd6 Mon Sep 17 00:00:00 2001 From: maias Date: Fri, 23 May 2025 10:59:37 +0300 Subject: [PATCH 74/89] build --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c2efefcfafd82..6a65578eef996 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,7 @@ on: push: branches: - feature_branch - # Trigger on push to the dev branch + # Trigger on push to the dev branch just try jobs: build: From 3353b58479270837ef37611ac6dcacd49606335e Mon Sep 17 00:00:00 2001 From: maias Date: Fri, 23 May 2025 11:56:53 +0300 Subject: [PATCH 75/89] build --- docker-compose.local.yml | 15 +++ main/java/org/example/DriverFactory.java | 62 +++++++++ main/java/org/example/HomePageGit.java | 75 +++++++++++ main/java/org/example/LoginGit.java | 61 +++++++++ main/java/org/example/Main.java | 21 +++ main/java/org/example/NewProjectPage.java | 132 +++++++++++++++++++ main/java/org/example/ProfilePage.java | 61 +++++++++ main/java/org/example/ProjectPage.java | 51 ++++++++ pom.xml | 102 +++++++++++++++ tests/APITests/APITestGiteaTest.java | 63 +++++++++ tests/UITests/LoginGitTest.java | 81 ++++++++++++ tests/UITests/NewProjectPageTest.java | 151 ++++++++++++++++++++++ 12 files changed, 875 insertions(+) create mode 100644 docker-compose.local.yml create mode 100644 main/java/org/example/DriverFactory.java create mode 100644 main/java/org/example/HomePageGit.java create mode 100644 main/java/org/example/LoginGit.java create mode 100644 main/java/org/example/Main.java create mode 100644 main/java/org/example/NewProjectPage.java create mode 100644 main/java/org/example/ProfilePage.java create mode 100644 main/java/org/example/ProjectPage.java create mode 100644 pom.xml create mode 100644 tests/APITests/APITestGiteaTest.java create mode 100644 tests/UITests/LoginGitTest.java create mode 100644 tests/UITests/NewProjectPageTest.java diff --git a/docker-compose.local.yml b/docker-compose.local.yml new file mode 100644 index 0000000000000..515481709c086 --- /dev/null +++ b/docker-compose.local.yml @@ -0,0 +1,15 @@ +version: '3' + +services: + gitea: + image: gitea/gitea:1.23.0 + container_name: gitea + ports: + - "3000:3000" + - "222:22" + volumes: + - ./gitea:/data + environment: + - USER_UID=1000 + - USER_GID=1000 + restart: always diff --git a/main/java/org/example/DriverFactory.java b/main/java/org/example/DriverFactory.java new file mode 100644 index 0000000000000..7017a54a13e7d --- /dev/null +++ b/main/java/org/example/DriverFactory.java @@ -0,0 +1,62 @@ +package org.example; + +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.chrome.ChromeDriver; +import org.openqa.selenium.chrome.ChromeOptions; +import org.openqa.selenium.firefox.FirefoxDriver; +import org.openqa.selenium.firefox.FirefoxOptions; +import org.openqa.selenium.remote.RemoteWebDriver; + +import java.net.MalformedURLException; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; +import java.util.Optional; + +public class DriverFactory { + + private static final String grid_url = System.getenv("GRID_URL"); + + private static final String browser = Optional + .ofNullable(System.getenv("BROWSER")) + .orElse("chrome"); + + public static WebDriver getDriver() { + if (grid_url != null) { + return getRemoteDriver(browser); + } else { + return getLocalDriver(browser); + } + } + + private static WebDriver getRemoteDriver(String browser) { + URL hubUrl; + try { + hubUrl = new URI(grid_url).toURL(); + } catch (URISyntaxException | MalformedURLException err) { + throw new IllegalArgumentException("Invalid grid URL"); + } + + if (browser.equalsIgnoreCase("chrome")) { + ChromeOptions options = new ChromeOptions(); + options.addArguments("--headless"); + return new RemoteWebDriver(hubUrl, options); + } else if (browser.equalsIgnoreCase("firefox")) { + FirefoxOptions options = new FirefoxOptions(); + options.addArguments("-headless"); + return new RemoteWebDriver(hubUrl, options); + } else { + throw new IllegalArgumentException("Unsupported browser: " + browser); + } + } + + private static WebDriver getLocalDriver(String browser) { + if (browser.equalsIgnoreCase("chrome")) { + return new ChromeDriver(); + } else if (browser.equalsIgnoreCase("firefox")) { + return new FirefoxDriver(); + } else { + throw new IllegalArgumentException("Unsupported browser: " + browser); + } + } +} \ No newline at end of file diff --git a/main/java/org/example/HomePageGit.java b/main/java/org/example/HomePageGit.java new file mode 100644 index 0000000000000..f2876064f1ea0 --- /dev/null +++ b/main/java/org/example/HomePageGit.java @@ -0,0 +1,75 @@ +package org.example; + +import org.junit.jupiter.api.Assertions; +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.PageFactory; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.LoadableComponent; +import org.openqa.selenium.support.ui.Wait; +import org.openqa.selenium.support.ui.WebDriverWait; + +import java.time.Duration; +import java.util.List; + +public class HomePageGit extends LoadableComponent { + private WebDriver driver; + private List elements; + private final String baseURL="http://localhost:3000/user/login"; + //String baseURL2="https://a7bd-2a06-c701-78fb-bc00-e162-b721-5502-6b4b.ngrok-free.app/user/login"; + //String baseURL = System.getenv("URL"); + + @Override + protected void load() { + this.driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10)); + driver.get(baseURL+"/"); + System.out.println(driver.getCurrentUrl()); + + } + + // @Override + protected void isLoaded() throws Error { + Assertions.assertTrue(driver.getTitle().contains("Dashboard")); + + } + + // Constructor + public HomePageGit(WebDriver driver) { + this.driver = driver; + PageFactory.initElements(driver,this); + + } + + // Method to initialize the elements list (called after the driver is initialized) + public void initializeElements() { + elements = driver.findElements(By.cssSelector("img.avatar, #_aria_auto_id_5")); // Adjust selectors accordingly + } + + public boolean isLoggedInSuccessfully() { + System.out.println(driver.getTitle()); + return driver.getTitle().contains("maias"); + } + + // Method to click on the image and then the profile button + public ProfilePage goToProfilePage() { + // Initialize the elements list here before accessing the elements + initializeElements(); + + // Assuming the first element in the list is the profile image (img.avatar) + WebElement profileImage = elements.get(0); // Index 0 is for the image element + WebElement dropdownButton = elements.get(1); // Index 1 is for the profile button + + // Wait for the profile image to be clickable and then click it + Wait wait = new WebDriverWait(driver, Duration.ofSeconds(10), Duration.ofMillis(500)); + wait.until(ExpectedConditions.elementToBeClickable(profileImage)).click(); + + // Wait for the profile button to be clickable and then click it + wait.until(ExpectedConditions.elementToBeClickable(dropdownButton)).click(); + + // Return a new ProfilePageGit object (you need to create this class to represent the profile page) + return new ProfilePage(driver); + } + + +} diff --git a/main/java/org/example/LoginGit.java b/main/java/org/example/LoginGit.java new file mode 100644 index 0000000000000..9a86747073daa --- /dev/null +++ b/main/java/org/example/LoginGit.java @@ -0,0 +1,61 @@ +package org.example; + +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.support.PageFactory; +import org.openqa.selenium.support.ui.LoadableComponent; + +import java.time.Duration; + +import static org.junit.jupiter.api.Assertions.assertTrue; + + +public class LoginGit extends LoadableComponent { + private WebDriver driver; + private final String baseURL="http://localhost:3000"; + //String baseURL1="https://a7bd-2a06-c701-78fb-bc00-e162-b721-5502-6b4b.ngrok-free.app"; + private By userNameFieldBy = By.cssSelector("input[name=\"user_name\"]"); + public By passwordFieldBy = By.cssSelector("input[name=\"password\"]"); + private By signinButtonBy = By.cssSelector("button.ui.primary.button.tw-w-full"); + + public LoginGit(WebDriver driver) { + this.driver = driver; + PageFactory.initElements(driver,this); + + } + public HomePageGit loginAsValidUser(String userName, String password) { + + driver.findElement(userNameFieldBy).sendKeys(userName); + driver.findElement(passwordFieldBy).sendKeys(password); + driver.findElement(signinButtonBy).click(); + + return new HomePageGit(driver); + } + public LoginGit loginWithInvalidCredentials(String userName, String password){ + driver.findElement(userNameFieldBy).clear(); + driver.findElement(userNameFieldBy).sendKeys(userName); + driver.findElement(passwordFieldBy).clear(); + driver.findElement(passwordFieldBy).sendKeys(password); + driver.findElement(signinButtonBy).click(); + return new LoginGit(driver) ; + } + public boolean isLoginFailed(){ + + return driver.getTitle().contains("Sign In"); + } + + @Override + protected void load() { + this.driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10)); + driver.get(baseURL+"/user/login"); + System.out.println(driver.getCurrentUrl()); + + } + + @Override + protected void isLoaded() throws Error { + assertTrue(driver.getTitle().contains("Sign In")); + + } +} + diff --git a/main/java/org/example/Main.java b/main/java/org/example/Main.java new file mode 100644 index 0000000000000..eb35c28605980 --- /dev/null +++ b/main/java/org/example/Main.java @@ -0,0 +1,21 @@ +package org.example; + +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.chrome.ChromeDriver; + +public class Main { + + private static final String baseURL = "http://localhost:3000/"; + //private static final String baseURL=" https://thin-zoos-ask.loca.lt/"; + + public static void main(String[] args) { + WebDriver driver = new ChromeDriver(); + driver.get(baseURL); + + + + driver.quit(); + } +} \ No newline at end of file diff --git a/main/java/org/example/NewProjectPage.java b/main/java/org/example/NewProjectPage.java new file mode 100644 index 0000000000000..1cd780c540b06 --- /dev/null +++ b/main/java/org/example/NewProjectPage.java @@ -0,0 +1,132 @@ +package org.example; + +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.interactions.Actions; +import org.openqa.selenium.support.PageFactory; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.LoadableComponent; +import org.openqa.selenium.support.ui.Wait; +import org.openqa.selenium.support.ui.WebDriverWait; + +import java.time.Duration; + +import static org.junit.jupiter.api.Assertions.assertTrue; + + +public class NewProjectPage extends LoadableComponent { + private WebDriver driver; + private final String baseURL="http://localhost:3000/user/login"; + //private static final String baseURL1="https://a7bd-2a06-c701-78fb-bc00-e162-b721-5502-6b4b.ngrok-free.app/user/login"; + + // Locators for New Project Fields + private By titleField = By.id("_aria_auto_id_0"); + private By descriptionField = By.id("_combo_markdown_editor_1"); + private By templateDropdown = By.id("_aria_auto_id_13"); + private By cardPreviewsDropdown = By.id("_aria_auto_id_17"); + private By createProjectButton = By.cssSelector(".ui.primary.button"); + private By cancelButton = By.cssSelector(".ui.cancel.button"); + + // Locators for Description Buttons + private By boldButton = By.cssSelector("md-bold.markdown-toolbar-button[aria-label='Add bold text']"); + private By numberProjects=By.cssSelector("div.ui.small.label"); + + + // Constructor + public NewProjectPage(WebDriver driver) { + this.driver = driver; + + // This call sets the WebElement fields. + PageFactory.initElements(driver, this); + } + + // Actions for New Project Fields + public void enterTitle(String title) { + driver.findElement(titleField).sendKeys(title); + } + + public void enterDescription(String description) { + Wait wait = new WebDriverWait(driver, Duration.ofSeconds(5), Duration.ofMillis(500)); + wait.until(driver -> driver.findElement(descriptionField).isDisplayed()); + driver.findElement(descriptionField).sendKeys(description); + } + + public void selectTemplate(String templateName) { + Actions actions = new Actions(driver); + + // Click the dropdown + WebElement dropdown = driver.findElement(By.xpath("//div[@class='ui selection dropdown']")); + actions.moveToElement(dropdown).click().perform(); + + // Click the option + WebElement option = driver.findElement(By.xpath("//div[@role='option' and text()='" + templateName + "']")); + actions.moveToElement(option).click().perform(); + } + + + public void selectCardPreview(String cardPreviewOption) { + + Actions actions=new Actions(driver); + + WebElement dropdown= driver.findElement(By.xpath("//div[@class='ui selection dropdown']")); + actions.moveToElement(dropdown).click().perform(); + + WebElement option=driver.findElement(By.xpath("//div[@role='option' and text()='" + cardPreviewOption + "']")); + actions.moveToElement(option).click().perform(); + + } + + public void clickCreateProject() { + driver.findElement(createProjectButton).click(); + } + + public void clickCancel() { + driver.findElement(cancelButton).click(); + } + + // Actions for Description Buttons + public void clickBoldButton() { + driver.findElement(boldButton).click(); + } + + + + // Getter for Description Content + public String getDescriptionContent() { + WebElement previewElement = driver.findElement(descriptionField); + String content = previewElement.getAttribute("value"); + return content; + } + public int getNumberOfProjects(){ + WebElement numberElement = driver.findElement(numberProjects); + + + + String numberText = numberElement.getText(); + int number = Integer.parseInt(numberText); + return number; + + + } + + public boolean isSuccessfulProjectPage(){ + + + return driver.getTitle().equals("Projects - Gitea: Git with a cup of tea"); + + } + + @Override + protected void load() { + this.driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(2)); + driver.get(baseURL+"/maias/-/projects/new"); + } + + @Override + protected void isLoaded() throws Error { + + assertTrue(driver.getTitle().contains("New Project")); + + } +} diff --git a/main/java/org/example/ProfilePage.java b/main/java/org/example/ProfilePage.java new file mode 100644 index 0000000000000..1e31a32286ad9 --- /dev/null +++ b/main/java/org/example/ProfilePage.java @@ -0,0 +1,61 @@ +package org.example; + +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.PageFactory; +import org.openqa.selenium.support.ui.LoadableComponent; +import org.openqa.selenium.support.ui.WebDriverWait; + +import java.time.Duration; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertTrue; + + +public class ProfilePage extends LoadableComponent { + private WebDriver driver; + private final String baseURL="http://localhost:3000/user/login"; + //private static final String baseURL1="https://a7bd-2a06-c701-78fb-bc00-e162-b721-5502-6b4b.ngrok-free.app/user/login"; + + // Locator for the list of project links + private By projectLinksBy = By.cssSelector("div.overflow-menu-items a[href='/maias/-/projects']"); + + public ProfilePage(WebDriver driver) { + this.driver = driver; + // This call sets the WebElement fields. + PageFactory.initElements(driver, this); + + } + + // Method to click on the Projects link (choosing from the list) + public ProjectPage goToProjectsPage() { + WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10)); + + // Wait until at least one project link is visible (lambda function for custom condition) + List projectLinks = wait.until(driver -> driver.findElements(projectLinksBy)); + System.out.println(projectLinks); + // Select and click on the first available project link (or you can choose any specific link) + if (!projectLinks.isEmpty()) { + WebElement SecondProjectLink = projectLinks.get(0); // Choose based on index (0 for the first link) + SecondProjectLink.click(); + } + + // Return a new ProjectPage object + return new ProjectPage(driver); + } + + @Override + protected void load() { + this.driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(2)); + driver.get(baseURL+"/maias"); + + + } + + @Override + protected void isLoaded() throws Error { + assertTrue(driver.getTitle().contains("maias - Gitea")); + + } +} diff --git a/main/java/org/example/ProjectPage.java b/main/java/org/example/ProjectPage.java new file mode 100644 index 0000000000000..a5d52d5bd533e --- /dev/null +++ b/main/java/org/example/ProjectPage.java @@ -0,0 +1,51 @@ +package org.example; + +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.PageFactory; +import org.openqa.selenium.support.ui.LoadableComponent; + +import java.time.Duration; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class ProjectPage extends LoadableComponent { + private WebDriver driver; + private final String baseURL="http://localhost:3000/user/login"; + //private static final String baseURL1="https://a7bd-2a06-c701-78fb-bc00-e162-b721-5502-6b4b.ngrok-free.app/user/login"; + + // CSS selector for the "New Project" button + private By newProjectButtonBy = By.linkText("New Project"); + + public ProjectPage(WebDriver driver) { + this.driver = driver; + // This call sets the WebElement fields. + PageFactory.initElements(driver, this); + + } + + // Method to click the "New Project" button and go to the New Project page + public NewProjectPage goToNewProjectPage() { + // Find the "New Project" button + WebElement newProjectButton = driver.findElement(newProjectButtonBy); + + // Click the "New Project" button + newProjectButton.click(); + + // Return a new instance of the NewProjectPage class (you need to create this class) + return new NewProjectPage(driver); + } + + @Override + protected void load() { + this.driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(2)); + driver.get(baseURL+"/maias/-/projects"); + } + + @Override + protected void isLoaded() throws Error { + assertTrue(driver.getTitle().contains("Projects")); + + } +} diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000000000..0f0f37e934756 --- /dev/null +++ b/pom.xml @@ -0,0 +1,102 @@ + + + 4.0.0 + + org.example + GiteAutomationProject + 1.0-SNAPSHOT + + + 17 + 17 + + + + + + org.seleniumhq.selenium + selenium-java + 4.27.0 + + + + + org.junit.jupiter + junit-jupiter-engine + 5.10.5 + test + + + org.junit.jupiter + junit-jupiter-api + 5.10.5 + compile + + + + io.rest-assured + rest-assured + 5.3.2 + + + + io.rest-assured + json-path + 5.3.2 + + + + io.rest-assured + xml-path + 5.3.2 + + + io.rest-assured + rest-assured + 5.3.2 + + + + io.rest-assured + json-path + 5.3.2 + + + + io.rest-assured + xml-path + 5.3.2 + + + io.rest-assured + rest-assured + 5.4.0 + test + + + + + + + + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.5.2 + + + org.apache.maven.plugins + maven-dependency-plugin + 3.1.0 + + + + \ No newline at end of file diff --git a/tests/APITests/APITestGiteaTest.java b/tests/APITests/APITestGiteaTest.java new file mode 100644 index 0000000000000..2f213a94f4711 --- /dev/null +++ b/tests/APITests/APITestGiteaTest.java @@ -0,0 +1,63 @@ +package APITests; + +import io.restassured.RestAssured; +import io.restassured.http.ContentType; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.MethodOrderer; +import org.junit.jupiter.api.Order; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestMethodOrder; + +import java.net.URL; + +import static io.restassured.RestAssured.given; +import static org.hamcrest.CoreMatchers.equalTo; + +@TestMethodOrder(MethodOrderer.OrderAnnotation.class) +public class APITestGiteaTest { + + private static final String owner = "maias"; + private static final String apiToken = "c8a457697a30f6ddca2e551d061343a898dc0dac"; + private static final String projectName = "newRepoAPITest"; + + @BeforeAll + public static void setup() { + String dbUrl = "http://localhost:3001"; + //String baseURL="https://a7bd-2a06-c701-78fb-bc00-e162-b721-5502-6b4b.ngrok-free.app"; + RestAssured.baseURI =dbUrl + "/api/v1"; + //System.out.println(dbUrl); + } + + @Test + @Order(1) + public void testCreateRepo() { + given() + .log().all() + .header("Authorization", "token " + apiToken) + .contentType(ContentType.JSON) + .body("{ \"name\": \"" + projectName + "\", \"private\": false }") + .when() + .post("/user/repos") + .then() + .log().all() + .statusCode(201) + .body("name", equalTo(projectName)) + .body("private", equalTo(false)); + + } + + @Test + @Order(2) + public void testDeleteRepo() { + given() + .log().all() + .header("Authorization", "token " + apiToken) + .when() + .delete("/repos/" + owner + "/" + projectName) + .then() + .log().all() + .statusCode(204); + } + + +} diff --git a/tests/UITests/LoginGitTest.java b/tests/UITests/LoginGitTest.java new file mode 100644 index 0000000000000..281d71b95b5ea --- /dev/null +++ b/tests/UITests/LoginGitTest.java @@ -0,0 +1,81 @@ +package UITests; + +import org.example.HomePageGit; +import org.example.LoginGit; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.openqa.selenium.By; +import org.openqa.selenium.TimeoutException; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.Wait; +import org.openqa.selenium.support.ui.WebDriverWait; + +import java.net.MalformedURLException; +import java.time.Duration; + +import static org.example.DriverFactory.getDriver; +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class LoginGitTest { + WebDriver driver; + private LoginGit login; + private final String URL="http://localhost:3000/user/login"; + //String URL="https://a7bd-2a06-c701-78fb-bc00-e162-b721-5502-6b4b.ngrok-free.app/user/login"; + + + @BeforeEach + public void setUp() throws MalformedURLException { + driver= getDriver(); + driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(15)); + driver.manage().window().maximize(); + driver.get(URL); + + try{ + Wait wait=new WebDriverWait(driver, Duration.ofSeconds(5)); + WebElement visitButton= wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//button[text()='Visit Site']"))); + visitButton.click(); + } + catch (TimeoutException err){ + System.out.println("Ngrok warning page was not loaded"); + } + login = new LoginGit(driver).get(); + + } + @Test + public void testInvalidLogin() { + LoginGit page = login.loginWithInvalidCredentials("wrong", "wrong"); + assertTrue(page.isLoginFailed(), "Login should fail with invalid credentials"); + } + + @Test + public void testValidLogin() { + HomePageGit home = login.loginAsValidUser("maias", "maias123"); + assertTrue(home.isLoggedInSuccessfully(), "Login should be successful with valid credentials"); + } + + @Test + public void testEmptyUsername() { + LoginGit page = login.loginWithInvalidCredentials("", "Maias123"); + assertTrue(page.isLoginFailed(), "Login should fail when the username is empty"); + } + + @Test + public void testEmptyPassword() { + LoginGit page = login.loginWithInvalidCredentials("maias", ""); + assertTrue(page.isLoginFailed(), "Login should fail when the password is empty"); + } + + @Test + public void testEmptyUsernameAndPassword() { + LoginGit page = login.loginWithInvalidCredentials("", ""); + assertTrue(page.isLoginFailed(), "Login should fail when both username and password are empty"); + } + @AfterEach + public void tearDown() { + driver.quit(); + } + +} diff --git a/tests/UITests/NewProjectPageTest.java b/tests/UITests/NewProjectPageTest.java new file mode 100644 index 0000000000000..9cefb6ddbdc81 --- /dev/null +++ b/tests/UITests/NewProjectPageTest.java @@ -0,0 +1,151 @@ +package UITests; + +import org.example.*; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.openqa.selenium.By; +import org.openqa.selenium.TimeoutException; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.Wait; +import org.openqa.selenium.support.ui.WebDriverWait; + +import java.net.MalformedURLException; +import java.time.Duration; + +import static org.example.DriverFactory.getDriver; +import static org.junit.jupiter.api.Assertions.*; + +public class NewProjectPageTest { + private WebDriver driver; + private ProjectPage projectPage; + private LoginGit login; + private HomePageGit home; + private ProfilePage profile; + private NewProjectPage newProjectPage; + private final String URL = "http://localhost:3000/user/login"; + String URL2="https://a7bd-2a06-c701-78fb-bc00-e162-b721-5502-6b4b.ngrok-free.app/user/login"; + + @BeforeEach + public void setUp() throws MalformedURLException { + driver = getDriver(); + driver.manage().window().maximize(); + driver.get(URL); + try { + Wait wait = new WebDriverWait(driver, Duration.ofSeconds(5)); + WebElement visitButton = wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//button[text()='Visit Site']"))); + visitButton.click(); + } catch (TimeoutException err) { + System.out.println("Ngrok warning page was not loaded"); + } + login = new LoginGit(driver).get(); + } + + @Test + public void testCreateProject() { + //the bot pattern + newProjectPage = login.loginAsValidUser("maias", "maias123").goToProfilePage().goToProjectsPage().goToNewProjectPage(); + newProjectPage.enterTitle("Test1 Project"); + newProjectPage.enterDescription("This is a test project description."); + newProjectPage.selectTemplate("None"); + newProjectPage.selectCardPreview("Images and Text"); + newProjectPage.clickCreateProject(); + assertTrue(newProjectPage.isSuccessfulProjectPage()); + } + @Test //if we have emty title the project will not create + public void testEmptyFields() { + //the bot pattern + newProjectPage=login.loginAsValidUser("maias", "maias123").goToProfilePage().goToProjectsPage().goToNewProjectPage(); + newProjectPage.enterTitle(""); + newProjectPage.enterDescription("this is Description"); + newProjectPage.clickCreateProject(); + assertFalse(newProjectPage.isSuccessfulProjectPage()); + + + } + @Test //if we have emty title the project will not create + public void testTitleOnly() { + //the bot pattern + newProjectPage=login.loginAsValidUser("maias", "maias123").goToProfilePage().goToProjectsPage().goToNewProjectPage(); + newProjectPage.enterTitle("Test 3 Project"); + newProjectPage.clickCreateProject(); + assertTrue(newProjectPage.isSuccessfulProjectPage()); + + + } + @Test //if we have emty title the project will not create + public void testCancelButton() { + newProjectPage=login.loginAsValidUser("maias", "maias123").goToProfilePage().goToProjectsPage().goToNewProjectPage(); + newProjectPage.enterTitle("Test 4 Project"); + newProjectPage.enterDescription("This is a test project description."); + newProjectPage.selectTemplate("None"); + newProjectPage.selectCardPreview("Images and Text"); + int numberProjectBefore= newProjectPage.getNumberOfProjects(); + newProjectPage.clickCancel(); + int numberProjectafter=newProjectPage.getNumberOfProjects(); + assertEquals(numberProjectBefore,numberProjectafter); + + + } + + @Test// test BoldStyle after we write the description + public void testBoldStyleInDescription() { + newProjectPage=login.loginAsValidUser("maias", "maias123").goToProfilePage().goToProjectsPage().goToNewProjectPage(); + newProjectPage.enterTitle("Test5 Project"); + newProjectPage.enterDescription("This is a test description."); + newProjectPage.selectTemplate("Basic Kanban"); + newProjectPage.selectCardPreview("Text Only"); + // Apply bold styling + newProjectPage.clickBoldButton(); + // Get the HTML content after applying bold + String afterBoldHtml = newProjectPage.getDescriptionContent(); + // Verify that bold tags are added in the HTML + assertTrue(afterBoldHtml.contains("****") , + "Bold styling was not applied in the description preview."); + //Verify the content inside the bold tags is as expected + assertTrue(afterBoldHtml.contains("This is a test description."), + "Description content is incorrect after applying bold styling."); + // Create the project + newProjectPage.clickCreateProject(); + // Verify that the project was created successfully + assertTrue(newProjectPage.isSuccessfulProjectPage()); + } + @Test// test BoldStyle before we write the description + public void testBoldStyleInDescription2() { + newProjectPage=login.loginAsValidUser("maias", "maias123").goToProfilePage().goToProjectsPage().goToNewProjectPage(); + newProjectPage.enterTitle("Test6 Project"); + newProjectPage.clickBoldButton(); + newProjectPage.enterDescription("This is a test description."); + newProjectPage.selectTemplate("Basic Kanban"); + newProjectPage.selectCardPreview("Text Only"); + // Get the HTML content after applying bold + String afterBoldHtml = newProjectPage.getDescriptionContent(); + // Verify that bold tags are added in the HTML + assertTrue(afterBoldHtml.equals("**This is a test description.**") , + "Bold styling was not applied in the description preview."); + //Verify the content inside the bold tags is as expected + assertTrue(afterBoldHtml.contains("This is a test description."), + "Description content is incorrect after applying bold styling."); + // Create the project + newProjectPage.clickCreateProject(); + // Verify that the project was created successfully + assertTrue(newProjectPage.isSuccessfulProjectPage()); + } + @Test// test BoldStyle for some words we write the description + public void testBoldStyleInDescription3() { + newProjectPage=login.loginAsValidUser("maias", "maias123").goToProfilePage().goToProjectsPage().goToNewProjectPage(); + newProjectPage.enterTitle("Test 7 Project"); + newProjectPage.enterDescription("This is a test description."); + newProjectPage.clickBoldButton(); + newProjectPage.enterDescription("maias "); + newProjectPage.selectTemplate("Basic Kanban"); + newProjectPage.selectCardPreview("Text Only"); + newProjectPage.enterDescription("This not Bold"); + String afterAdditionalText=newProjectPage.getDescriptionContent(); + assertTrue(afterAdditionalText.equals("This is a test description.**maias **This not Bold"),"Bold styling was not applied in the description preview."); + newProjectPage.clickCreateProject(); + assertTrue(newProjectPage.isSuccessfulProjectPage()); + } +} + From e0c5e0facee2ae038599bc533b663db6a6410d78 Mon Sep 17 00:00:00 2001 From: maias Date: Fri, 23 May 2025 15:58:22 +0300 Subject: [PATCH 76/89] build --- main/java/org/example/HomePageGit.java | 75 ------------- main/java/org/example/Main.java | 21 ---- main/pom.xml | 72 +++++++++++++ .../main}/java/org/example/DriverFactory.java | 0 .../main/java/org/example/HomePageGit.java | 81 ++++++++++++++ .../main}/java/org/example/LoginGit.java | 0 .../java/org/example/NewProjectPage.java | 1 - .../main}/java/org/example/ProfilePage.java | 0 .../main}/java/org/example/ProjectPage.java | 0 .../test/java}/APITests/APITestGiteaTest.java | 4 +- .../src/test/java}/UITests/LoginGitTest.java | 0 .../java}/UITests/NewProjectPageTest.java | 29 +++-- pom.xml | 102 ------------------ 13 files changed, 174 insertions(+), 211 deletions(-) delete mode 100644 main/java/org/example/HomePageGit.java delete mode 100644 main/java/org/example/Main.java create mode 100644 main/pom.xml rename main/{ => src/main}/java/org/example/DriverFactory.java (100%) create mode 100644 main/src/main/java/org/example/HomePageGit.java rename main/{ => src/main}/java/org/example/LoginGit.java (100%) rename main/{ => src/main}/java/org/example/NewProjectPage.java (98%) rename main/{ => src/main}/java/org/example/ProfilePage.java (100%) rename main/{ => src/main}/java/org/example/ProjectPage.java (100%) rename {tests => main/src/test/java}/APITests/APITestGiteaTest.java (92%) rename {tests => main/src/test/java}/UITests/LoginGitTest.java (100%) rename {tests => main/src/test/java}/UITests/NewProjectPageTest.java (91%) delete mode 100644 pom.xml diff --git a/main/java/org/example/HomePageGit.java b/main/java/org/example/HomePageGit.java deleted file mode 100644 index f2876064f1ea0..0000000000000 --- a/main/java/org/example/HomePageGit.java +++ /dev/null @@ -1,75 +0,0 @@ -package org.example; - -import org.junit.jupiter.api.Assertions; -import org.openqa.selenium.By; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.PageFactory; -import org.openqa.selenium.support.ui.ExpectedConditions; -import org.openqa.selenium.support.ui.LoadableComponent; -import org.openqa.selenium.support.ui.Wait; -import org.openqa.selenium.support.ui.WebDriverWait; - -import java.time.Duration; -import java.util.List; - -public class HomePageGit extends LoadableComponent { - private WebDriver driver; - private List elements; - private final String baseURL="http://localhost:3000/user/login"; - //String baseURL2="https://a7bd-2a06-c701-78fb-bc00-e162-b721-5502-6b4b.ngrok-free.app/user/login"; - //String baseURL = System.getenv("URL"); - - @Override - protected void load() { - this.driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10)); - driver.get(baseURL+"/"); - System.out.println(driver.getCurrentUrl()); - - } - - // @Override - protected void isLoaded() throws Error { - Assertions.assertTrue(driver.getTitle().contains("Dashboard")); - - } - - // Constructor - public HomePageGit(WebDriver driver) { - this.driver = driver; - PageFactory.initElements(driver,this); - - } - - // Method to initialize the elements list (called after the driver is initialized) - public void initializeElements() { - elements = driver.findElements(By.cssSelector("img.avatar, #_aria_auto_id_5")); // Adjust selectors accordingly - } - - public boolean isLoggedInSuccessfully() { - System.out.println(driver.getTitle()); - return driver.getTitle().contains("maias"); - } - - // Method to click on the image and then the profile button - public ProfilePage goToProfilePage() { - // Initialize the elements list here before accessing the elements - initializeElements(); - - // Assuming the first element in the list is the profile image (img.avatar) - WebElement profileImage = elements.get(0); // Index 0 is for the image element - WebElement dropdownButton = elements.get(1); // Index 1 is for the profile button - - // Wait for the profile image to be clickable and then click it - Wait wait = new WebDriverWait(driver, Duration.ofSeconds(10), Duration.ofMillis(500)); - wait.until(ExpectedConditions.elementToBeClickable(profileImage)).click(); - - // Wait for the profile button to be clickable and then click it - wait.until(ExpectedConditions.elementToBeClickable(dropdownButton)).click(); - - // Return a new ProfilePageGit object (you need to create this class to represent the profile page) - return new ProfilePage(driver); - } - - -} diff --git a/main/java/org/example/Main.java b/main/java/org/example/Main.java deleted file mode 100644 index eb35c28605980..0000000000000 --- a/main/java/org/example/Main.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.example; - -import org.openqa.selenium.By; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.chrome.ChromeDriver; - -public class Main { - - private static final String baseURL = "http://localhost:3000/"; - //private static final String baseURL=" https://thin-zoos-ask.loca.lt/"; - - public static void main(String[] args) { - WebDriver driver = new ChromeDriver(); - driver.get(baseURL); - - - - driver.quit(); - } -} \ No newline at end of file diff --git a/main/pom.xml b/main/pom.xml new file mode 100644 index 0000000000000..bfa4f5321b3e8 --- /dev/null +++ b/main/pom.xml @@ -0,0 +1,72 @@ + + + + 4.0.0 + + org.example + main + 1.0-SNAPSHOT + + + 21 + 21 + UTF-8 + + + + + + org.seleniumhq.selenium + selenium-java + 4.27.0 + + + + + org.junit.jupiter + junit-jupiter-api + 5.10.5 + + + org.junit.jupiter + junit-jupiter-engine + 5.10.5 + test + + + + + io.rest-assured + rest-assured + 5.4.0 + + + io.rest-assured + json-path + 5.4.0 + + + io.rest-assured + xml-path + 5.4.0 + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.5.2 + + + org.apache.maven.plugins + maven-dependency-plugin + 3.1.0 + + + + + diff --git a/main/java/org/example/DriverFactory.java b/main/src/main/java/org/example/DriverFactory.java similarity index 100% rename from main/java/org/example/DriverFactory.java rename to main/src/main/java/org/example/DriverFactory.java diff --git a/main/src/main/java/org/example/HomePageGit.java b/main/src/main/java/org/example/HomePageGit.java new file mode 100644 index 0000000000000..bbf9ea19af975 --- /dev/null +++ b/main/src/main/java/org/example/HomePageGit.java @@ -0,0 +1,81 @@ +package org.example; + +import org.junit.jupiter.api.Assertions; +import org.openqa.selenium.By; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.PageFactory; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.openqa.selenium.support.ui.LoadableComponent; +import org.openqa.selenium.support.ui.Wait; +import org.openqa.selenium.support.ui.WebDriverWait; + +import java.time.Duration; +import java.util.List; + +public class HomePageGit extends LoadableComponent { + private WebDriver driver; + private List elements; + private final String baseURL = "http://localhost:3000/user/login"; + //String baseURL2="https://a7bd-2a06-c701-78fb-bc00-e162-b721-5502-6b4b.ngrok-free.app/user/login"; + //String baseURL = System.getenv("URL"); + + @Override + protected void load() { + this.driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10)); + driver.get(baseURL + "/"); + System.out.println(driver.getCurrentUrl()); + + } + + // @Override + protected void isLoaded() throws Error { + Assertions.assertTrue(driver.getTitle().contains("Dashboard")); + + } + + // Constructor + public HomePageGit(WebDriver driver) { + this.driver = driver; + PageFactory.initElements(driver, this); + + } + + // Method to initialize the elements list (called after the driver is initialized) + public void initializeElements() { + elements = driver.findElements(By.cssSelector("img.avatar, #_aria_auto_id_5")); // Adjust selectors accordingly + } + + public boolean isLoggedInSuccessfully() { + System.out.println(driver.getTitle()); + return driver.getTitle().contains("maias"); + } + + // Method to click on the image and then the profile button + public ProfilePage goToProfilePage() { + WebElement profileImage = driver.findElement(By.xpath("//*[@id=\"navbar\"]/div[2]/div[2]/span/img")); + profileImage.click(); + WebElement profilebtn=driver.findElement(By.xpath("//*[@id=\"_aria_auto_id_5\"]")); + profilebtn.click(); + // Initialize the elements list here before accessing the elements + /*initializeElements(); + + // Assuming the first element in the list is the profile image (img.avatar) + WebElement profileImage = elements.get(0); // Index 0 is for the image element + WebDriverWait wait1 = new WebDriverWait(driver, Duration.ofSeconds(30)); + WebElement dropdownButton = wait1.until(ExpectedConditions.elementToBeClickable(elements.get(1)));// Index 1 is for the profile button + + // Wait for the profile image to be clickable and then click it + Wait wait = new WebDriverWait(driver, Duration.ofSeconds(500), Duration.ofMillis(500)); + wait.until(ExpectedConditions.elementToBeClickable(profileImage)).click(); + + // Wait for the profile button to be clickable and then click it + wait.until(ExpectedConditions.elementToBeClickable(dropdownButton)).click();*/ + + // Return a new ProfilePageGit object (you need to create this class to represent the profile page) + return new ProfilePage(driver); + } +} + + + diff --git a/main/java/org/example/LoginGit.java b/main/src/main/java/org/example/LoginGit.java similarity index 100% rename from main/java/org/example/LoginGit.java rename to main/src/main/java/org/example/LoginGit.java diff --git a/main/java/org/example/NewProjectPage.java b/main/src/main/java/org/example/NewProjectPage.java similarity index 98% rename from main/java/org/example/NewProjectPage.java rename to main/src/main/java/org/example/NewProjectPage.java index 1cd780c540b06..b537d0ac174cc 100644 --- a/main/java/org/example/NewProjectPage.java +++ b/main/src/main/java/org/example/NewProjectPage.java @@ -5,7 +5,6 @@ import org.openqa.selenium.WebElement; import org.openqa.selenium.interactions.Actions; import org.openqa.selenium.support.PageFactory; -import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.LoadableComponent; import org.openqa.selenium.support.ui.Wait; import org.openqa.selenium.support.ui.WebDriverWait; diff --git a/main/java/org/example/ProfilePage.java b/main/src/main/java/org/example/ProfilePage.java similarity index 100% rename from main/java/org/example/ProfilePage.java rename to main/src/main/java/org/example/ProfilePage.java diff --git a/main/java/org/example/ProjectPage.java b/main/src/main/java/org/example/ProjectPage.java similarity index 100% rename from main/java/org/example/ProjectPage.java rename to main/src/main/java/org/example/ProjectPage.java diff --git a/tests/APITests/APITestGiteaTest.java b/main/src/test/java/APITests/APITestGiteaTest.java similarity index 92% rename from tests/APITests/APITestGiteaTest.java rename to main/src/test/java/APITests/APITestGiteaTest.java index 2f213a94f4711..c98bcca87d240 100644 --- a/tests/APITests/APITestGiteaTest.java +++ b/main/src/test/java/APITests/APITestGiteaTest.java @@ -17,12 +17,12 @@ public class APITestGiteaTest { private static final String owner = "maias"; - private static final String apiToken = "c8a457697a30f6ddca2e551d061343a898dc0dac"; + private static final String apiToken = "ba31311e2491c43ab847ad33f1ba7159ae453fdc"; private static final String projectName = "newRepoAPITest"; @BeforeAll public static void setup() { - String dbUrl = "http://localhost:3001"; + String dbUrl = "http://localhost:3000"; //String baseURL="https://a7bd-2a06-c701-78fb-bc00-e162-b721-5502-6b4b.ngrok-free.app"; RestAssured.baseURI =dbUrl + "/api/v1"; //System.out.println(dbUrl); diff --git a/tests/UITests/LoginGitTest.java b/main/src/test/java/UITests/LoginGitTest.java similarity index 100% rename from tests/UITests/LoginGitTest.java rename to main/src/test/java/UITests/LoginGitTest.java diff --git a/tests/UITests/NewProjectPageTest.java b/main/src/test/java/UITests/NewProjectPageTest.java similarity index 91% rename from tests/UITests/NewProjectPageTest.java rename to main/src/test/java/UITests/NewProjectPageTest.java index 9cefb6ddbdc81..c20f35dd6fea4 100644 --- a/tests/UITests/NewProjectPageTest.java +++ b/main/src/test/java/UITests/NewProjectPageTest.java @@ -1,8 +1,7 @@ package UITests; import org.example.*; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.*; import org.openqa.selenium.By; import org.openqa.selenium.TimeoutException; import org.openqa.selenium.WebDriver; @@ -17,6 +16,7 @@ import static org.example.DriverFactory.getDriver; import static org.junit.jupiter.api.Assertions.*; +@TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class NewProjectPageTest { private WebDriver driver; private ProjectPage projectPage; @@ -43,9 +43,10 @@ public void setUp() throws MalformedURLException { } @Test + @Order(1) public void testCreateProject() { //the bot pattern - newProjectPage = login.loginAsValidUser("maias", "maias123").goToProfilePage().goToProjectsPage().goToNewProjectPage(); + newProjectPage = login.loginAsValidUser("maias", "Maias123").goToProfilePage().goToProjectsPage().goToNewProjectPage(); newProjectPage.enterTitle("Test1 Project"); newProjectPage.enterDescription("This is a test project description."); newProjectPage.selectTemplate("None"); @@ -53,10 +54,11 @@ public void testCreateProject() { newProjectPage.clickCreateProject(); assertTrue(newProjectPage.isSuccessfulProjectPage()); } - @Test //if we have emty title the project will not create + @Test + @Order(2)//if we have emty title the project will not create public void testEmptyFields() { //the bot pattern - newProjectPage=login.loginAsValidUser("maias", "maias123").goToProfilePage().goToProjectsPage().goToNewProjectPage(); + newProjectPage=login.loginAsValidUser("maias", "Maias123").goToProfilePage().goToProjectsPage().goToNewProjectPage(); newProjectPage.enterTitle(""); newProjectPage.enterDescription("this is Description"); newProjectPage.clickCreateProject(); @@ -64,17 +66,19 @@ public void testEmptyFields() { } - @Test //if we have emty title the project will not create + @Test + @Order(3) + //if we have emty title the project will not create public void testTitleOnly() { //the bot pattern - newProjectPage=login.loginAsValidUser("maias", "maias123").goToProfilePage().goToProjectsPage().goToNewProjectPage(); - newProjectPage.enterTitle("Test 3 Project"); + newProjectPage=login.loginAsValidUser("maias", "Maias123").goToProfilePage().goToProjectsPage().goToNewProjectPage(); + newProjectPage.enterTitle("Test 3 Project2"); newProjectPage.clickCreateProject(); assertTrue(newProjectPage.isSuccessfulProjectPage()); } - @Test //if we have emty title the project will not create + /* @Test //if we have emty title the project will not create public void testCancelButton() { newProjectPage=login.loginAsValidUser("maias", "maias123").goToProfilePage().goToProjectsPage().goToNewProjectPage(); newProjectPage.enterTitle("Test 4 Project"); @@ -146,6 +150,11 @@ public void testBoldStyleInDescription3() { assertTrue(afterAdditionalText.equals("This is a test description.**maias **This not Bold"),"Bold styling was not applied in the description preview."); newProjectPage.clickCreateProject(); assertTrue(newProjectPage.isSuccessfulProjectPage()); - } + }*/ + @AfterEach + public void tearDown() { + driver.quit(); + } + } diff --git a/pom.xml b/pom.xml deleted file mode 100644 index 0f0f37e934756..0000000000000 --- a/pom.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - 4.0.0 - - org.example - GiteAutomationProject - 1.0-SNAPSHOT - - - 17 - 17 - - - - - - org.seleniumhq.selenium - selenium-java - 4.27.0 - - - - - org.junit.jupiter - junit-jupiter-engine - 5.10.5 - test - - - org.junit.jupiter - junit-jupiter-api - 5.10.5 - compile - - - - io.rest-assured - rest-assured - 5.3.2 - - - - io.rest-assured - json-path - 5.3.2 - - - - io.rest-assured - xml-path - 5.3.2 - - - io.rest-assured - rest-assured - 5.3.2 - - - - io.rest-assured - json-path - 5.3.2 - - - - io.rest-assured - xml-path - 5.3.2 - - - io.rest-assured - rest-assured - 5.4.0 - test - - - - - - - - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.5.2 - - - org.apache.maven.plugins - maven-dependency-plugin - 3.1.0 - - - - \ No newline at end of file From 13e476c37a93ea49b1c9ee8eada284b468f13f1c Mon Sep 17 00:00:00 2001 From: maias Date: Fri, 23 May 2025 16:10:15 +0300 Subject: [PATCH 77/89] build --- .github/{FUNDING.yml => FUNDING.y} | 0 .github/{actionlint.yaml => actionlint.ya} | 0 .github/{labeler.yml => labeler.y} | 0 .github/workflows/cron-licenses.yml | 54 +++--- .github/workflows/cron-translations.yml | 72 +++---- .github/workflows/files-changed.yml | 178 +++++++++--------- .github/workflows/integration-tests.yml | 6 +- ...{pull-compliance.yml => pull-compliance.y} | 0 ...docker-dryrun.yml => pull-docker-dryrun.y} | 0 .../{pull-e2e-tests.yml => pull-e2e-tests.y} | 0 .../{pull-labeler.yml => pull-labeler.y} | 0 ...{release-nightly.yml => release-nightly.y} | 0 .../{release-tag-rc.yml => release-tag-rc.y} | 0 ...-tag-version.yml => release-tag-version.y} | 0 14 files changed, 155 insertions(+), 155 deletions(-) rename .github/{FUNDING.yml => FUNDING.y} (100%) rename .github/{actionlint.yaml => actionlint.ya} (100%) rename .github/{labeler.yml => labeler.y} (100%) rename .github/workflows/{pull-compliance.yml => pull-compliance.y} (100%) rename .github/workflows/{pull-docker-dryrun.yml => pull-docker-dryrun.y} (100%) rename .github/workflows/{pull-e2e-tests.yml => pull-e2e-tests.y} (100%) rename .github/workflows/{pull-labeler.yml => pull-labeler.y} (100%) rename .github/workflows/{release-nightly.yml => release-nightly.y} (100%) rename .github/workflows/{release-tag-rc.yml => release-tag-rc.y} (100%) rename .github/workflows/{release-tag-version.yml => release-tag-version.y} (100%) diff --git a/.github/FUNDING.yml b/.github/FUNDING.y similarity index 100% rename from .github/FUNDING.yml rename to .github/FUNDING.y diff --git a/.github/actionlint.yaml b/.github/actionlint.ya similarity index 100% rename from .github/actionlint.yaml rename to .github/actionlint.ya diff --git a/.github/labeler.yml b/.github/labeler.y similarity index 100% rename from .github/labeler.yml rename to .github/labeler.y diff --git a/.github/workflows/cron-licenses.yml b/.github/workflows/cron-licenses.yml index 33cbc507d9677..e661ca9458cbc 100644 --- a/.github/workflows/cron-licenses.yml +++ b/.github/workflows/cron-licenses.yml @@ -1,29 +1,29 @@ -name: cron-licenses +# name: cron-licenses -on: - # schedule: - # - cron: "7 0 * * 1" # every Monday at 00:07 UTC - workflow_dispatch: +# on: +# # schedule: +# # - cron: "7 0 * * 1" # every Monday at 00:07 UTC +# workflow_dispatch: -jobs: - cron-licenses: - runs-on: ubuntu-latest - if: github.repository == 'go-gitea/gitea' - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - check-latest: true - - run: make generate-license generate-gitignore - timeout-minutes: 40 - - name: push translations to repo - uses: appleboy/git-push-action@v0.0.3 - 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 }} +# jobs: +# cron-licenses: +# runs-on: ubuntu-latest +# if: github.repository == 'go-gitea/gitea' +# steps: +# - uses: actions/checkout@v4 +# - uses: actions/setup-go@v5 +# with: +# go-version-file: go.mod +# check-latest: true +# - run: make generate-license generate-gitignore +# timeout-minutes: 40 +# - name: push translations to repo +# uses: appleboy/git-push-action@v0.0.3 +# 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-translations.yml b/.github/workflows/cron-translations.yml index f1b51debf1223..e776a0d5dc713 100644 --- a/.github/workflows/cron-translations.yml +++ b/.github/workflows/cron-translations.yml @@ -1,38 +1,38 @@ -name: cron-translations +# name: cron-translations -on: - schedule: - - cron: "7 0 * * *" # every day at 00:07 UTC - workflow_dispatch: +# on: +# schedule: +# - cron: "7 0 * * *" # every day at 00:07 UTC +# workflow_dispatch: -jobs: - crowdin-pull: - runs-on: ubuntu-latest - if: github.repository == 'go-gitea/gitea' - steps: - - uses: actions/checkout@v4 - - uses: crowdin/github-action@v1 - with: - upload_sources: true - upload_translations: false - download_sources: false - download_translations: true - push_translations: false - push_sources: false - create_pull_request: false - config: crowdin.yml - env: - CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} - CROWDIN_KEY: ${{ secrets.CROWDIN_KEY }} - - name: update locales - run: ./build/update-locales.sh - - name: push translations to repo - uses: appleboy/git-push-action@v0.0.3 - 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 }} +# jobs: +# crowdin-pull: +# runs-on: ubuntu-latest +# if: github.repository == 'go-gitea/gitea' +# steps: +# - uses: actions/checkout@v4 +# - uses: crowdin/github-action@v1 +# with: +# upload_sources: true +# upload_translations: false +# download_sources: false +# download_translations: true +# push_translations: false +# push_sources: false +# create_pull_request: false +# config: crowdin.yml +# env: +# CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} +# CROWDIN_KEY: ${{ secrets.CROWDIN_KEY }} +# - name: update locales +# run: ./build/update-locales.sh +# - name: push translations to repo +# uses: appleboy/git-push-action@v0.0.3 +# 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 }} diff --git a/.github/workflows/files-changed.yml b/.github/workflows/files-changed.yml index 7c1fb024421bc..ab996616c8442 100644 --- a/.github/workflows/files-changed.yml +++ b/.github/workflows/files-changed.yml @@ -1,98 +1,98 @@ -name: files-changed +# name: files-changed -on: - workflow_call: - outputs: - backend: - value: ${{ jobs.detect.outputs.backend }} - frontend: - value: ${{ jobs.detect.outputs.frontend }} - docs: - value: ${{ jobs.detect.outputs.docs }} - actions: - value: ${{ jobs.detect.outputs.actions }} - templates: - value: ${{ jobs.detect.outputs.templates }} - docker: - value: ${{ jobs.detect.outputs.docker }} - swagger: - value: ${{ jobs.detect.outputs.swagger }} - yaml: - value: ${{ jobs.detect.outputs.yaml }} +# on: +# workflow_call: +# outputs: +# backend: +# value: ${{ jobs.detect.outputs.backend }} +# frontend: +# value: ${{ jobs.detect.outputs.frontend }} +# docs: +# value: ${{ jobs.detect.outputs.docs }} +# actions: +# value: ${{ jobs.detect.outputs.actions }} +# templates: +# value: ${{ jobs.detect.outputs.templates }} +# docker: +# value: ${{ jobs.detect.outputs.docker }} +# swagger: +# value: ${{ jobs.detect.outputs.swagger }} +# yaml: +# value: ${{ jobs.detect.outputs.yaml }} -jobs: - detect: - runs-on: ubuntu-latest - timeout-minutes: 3 - outputs: - backend: ${{ steps.changes.outputs.backend }} - frontend: ${{ steps.changes.outputs.frontend }} - docs: ${{ steps.changes.outputs.docs }} - actions: ${{ steps.changes.outputs.actions }} - templates: ${{ steps.changes.outputs.templates }} - docker: ${{ steps.changes.outputs.docker }} - swagger: ${{ steps.changes.outputs.swagger }} - yaml: ${{ steps.changes.outputs.yaml }} - steps: - - uses: actions/checkout@v4 - - uses: dorny/paths-filter@v3 - id: changes - with: - filters: | - backend: - - "**/*.go" - - "templates/**/*.tmpl" - - "assets/emoji.json" - - "go.mod" - - "go.sum" - - "Makefile" - - ".golangci.yml" - - ".editorconfig" - - "options/locale/locale_en-US.ini" +# jobs: +# detect: +# runs-on: ubuntu-latest +# timeout-minutes: 3 +# outputs: +# backend: ${{ steps.changes.outputs.backend }} +# frontend: ${{ steps.changes.outputs.frontend }} +# docs: ${{ steps.changes.outputs.docs }} +# actions: ${{ steps.changes.outputs.actions }} +# templates: ${{ steps.changes.outputs.templates }} +# docker: ${{ steps.changes.outputs.docker }} +# swagger: ${{ steps.changes.outputs.swagger }} +# yaml: ${{ steps.changes.outputs.yaml }} +# steps: +# - uses: actions/checkout@v4 +# - uses: dorny/paths-filter@v3 +# id: changes +# with: +# filters: | +# backend: +# - "**/*.go" +# - "templates/**/*.tmpl" +# - "assets/emoji.json" +# - "go.mod" +# - "go.sum" +# - "Makefile" +# - ".golangci.yml" +# - ".editorconfig" +# - "options/locale/locale_en-US.ini" - frontend: - - "**/*.js" - - "web_src/**" - - "assets/emoji.json" - - "package.json" - - "package-lock.json" - - "Makefile" - - ".eslintrc.yaml" - - "stylelint.config.js" - - ".npmrc" +# frontend: +# - "**/*.js" +# - "web_src/**" +# - "assets/emoji.json" +# - "package.json" +# - "package-lock.json" +# - "Makefile" +# - ".eslintrc.yaml" +# - "stylelint.config.js" +# - ".npmrc" - docs: - - "**/*.md" - - ".markdownlint.yaml" - - "package.json" - - "package-lock.json" +# docs: +# - "**/*.md" +# - ".markdownlint.yaml" +# - "package.json" +# - "package-lock.json" - actions: - - ".github/workflows/*" - - "Makefile" +# actions: +# - ".github/workflows/*" +# - "Makefile" - templates: - - "tools/lint-templates-*.js" - - "templates/**/*.tmpl" - - "pyproject.toml" - - "poetry.lock" +# templates: +# - "tools/lint-templates-*.js" +# - "templates/**/*.tmpl" +# - "pyproject.toml" +# - "poetry.lock" - docker: - - "Dockerfile" - - "Dockerfile.rootless" - - "docker/**" - - "Makefile" +# docker: +# - "Dockerfile" +# - "Dockerfile.rootless" +# - "docker/**" +# - "Makefile" - swagger: - - "templates/swagger/v1_json.tmpl" - - "Makefile" - - "package.json" - - "package-lock.json" - - ".spectral.yaml" +# swagger: +# - "templates/swagger/v1_json.tmpl" +# - "Makefile" +# - "package.json" +# - "package-lock.json" +# - ".spectral.yaml" - yaml: - - "**/*.yml" - - "**/*.yaml" - - ".yamllint.yaml" - - "pyproject.toml" - - "poetry.lock" +# yaml: +# - "**/*.yml" +# - "**/*.yaml" +# - ".yamllint.yaml" +# - "pyproject.toml" +# - "poetry.lock" diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index b5baabccb5dce..e99fd63c72378 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,9 +1,9 @@ name: Gitea Setup and Testing on: - push: - branches: - - feature_branch + # push: + # branches: + # - feature_branch pull_request: branches: diff --git a/.github/workflows/pull-compliance.yml b/.github/workflows/pull-compliance.y similarity index 100% rename from .github/workflows/pull-compliance.yml rename to .github/workflows/pull-compliance.y diff --git a/.github/workflows/pull-docker-dryrun.yml b/.github/workflows/pull-docker-dryrun.y similarity index 100% rename from .github/workflows/pull-docker-dryrun.yml rename to .github/workflows/pull-docker-dryrun.y diff --git a/.github/workflows/pull-e2e-tests.yml b/.github/workflows/pull-e2e-tests.y similarity index 100% rename from .github/workflows/pull-e2e-tests.yml rename to .github/workflows/pull-e2e-tests.y diff --git a/.github/workflows/pull-labeler.yml b/.github/workflows/pull-labeler.y similarity index 100% rename from .github/workflows/pull-labeler.yml rename to .github/workflows/pull-labeler.y diff --git a/.github/workflows/release-nightly.yml b/.github/workflows/release-nightly.y similarity index 100% rename from .github/workflows/release-nightly.yml rename to .github/workflows/release-nightly.y diff --git a/.github/workflows/release-tag-rc.yml b/.github/workflows/release-tag-rc.y similarity index 100% rename from .github/workflows/release-tag-rc.yml rename to .github/workflows/release-tag-rc.y diff --git a/.github/workflows/release-tag-version.yml b/.github/workflows/release-tag-version.y similarity index 100% rename from .github/workflows/release-tag-version.yml rename to .github/workflows/release-tag-version.y From 01be65a8d0eb544b2c6e6910f55a48eccc896e3c Mon Sep 17 00:00:00 2001 From: maias Date: Fri, 23 May 2025 16:12:23 +0300 Subject: [PATCH 78/89] build --- .github/{workflows => workflow}/build.yml | 0 .github/{workflows => workflows1}/cron-licenses.yml | 0 .github/{workflows => workflows1}/cron-translations.yml | 0 .github/{workflows => workflows1}/files-changed.yml | 0 .github/{workflows => workflows1}/integration-tests.yml | 0 .github/{workflows => workflows1}/pull-compliance.y | 0 .github/{workflows => workflows1}/pull-db-tests.yml | 0 .github/{workflows => workflows1}/pull-docker-dryrun.y | 0 .github/{workflows => workflows1}/pull-e2e-tests.y | 0 .github/{workflows => workflows1}/pull-labeler.y | 0 .github/{workflows => workflows1}/release-nightly.y | 0 .github/{workflows => workflows1}/release-tag-rc.y | 0 .github/{workflows => workflows1}/release-tag-version.y | 0 13 files changed, 0 insertions(+), 0 deletions(-) rename .github/{workflows => workflow}/build.yml (100%) rename .github/{workflows => workflows1}/cron-licenses.yml (100%) rename .github/{workflows => workflows1}/cron-translations.yml (100%) rename .github/{workflows => workflows1}/files-changed.yml (100%) rename .github/{workflows => workflows1}/integration-tests.yml (100%) rename .github/{workflows => workflows1}/pull-compliance.y (100%) rename .github/{workflows => workflows1}/pull-db-tests.yml (100%) rename .github/{workflows => workflows1}/pull-docker-dryrun.y (100%) rename .github/{workflows => workflows1}/pull-e2e-tests.y (100%) rename .github/{workflows => workflows1}/pull-labeler.y (100%) rename .github/{workflows => workflows1}/release-nightly.y (100%) rename .github/{workflows => workflows1}/release-tag-rc.y (100%) rename .github/{workflows => workflows1}/release-tag-version.y (100%) diff --git a/.github/workflows/build.yml b/.github/workflow/build.yml similarity index 100% rename from .github/workflows/build.yml rename to .github/workflow/build.yml diff --git a/.github/workflows/cron-licenses.yml b/.github/workflows1/cron-licenses.yml similarity index 100% rename from .github/workflows/cron-licenses.yml rename to .github/workflows1/cron-licenses.yml diff --git a/.github/workflows/cron-translations.yml b/.github/workflows1/cron-translations.yml similarity index 100% rename from .github/workflows/cron-translations.yml rename to .github/workflows1/cron-translations.yml diff --git a/.github/workflows/files-changed.yml b/.github/workflows1/files-changed.yml similarity index 100% rename from .github/workflows/files-changed.yml rename to .github/workflows1/files-changed.yml diff --git a/.github/workflows/integration-tests.yml b/.github/workflows1/integration-tests.yml similarity index 100% rename from .github/workflows/integration-tests.yml rename to .github/workflows1/integration-tests.yml diff --git a/.github/workflows/pull-compliance.y b/.github/workflows1/pull-compliance.y similarity index 100% rename from .github/workflows/pull-compliance.y rename to .github/workflows1/pull-compliance.y diff --git a/.github/workflows/pull-db-tests.yml b/.github/workflows1/pull-db-tests.yml similarity index 100% rename from .github/workflows/pull-db-tests.yml rename to .github/workflows1/pull-db-tests.yml diff --git a/.github/workflows/pull-docker-dryrun.y b/.github/workflows1/pull-docker-dryrun.y similarity index 100% rename from .github/workflows/pull-docker-dryrun.y rename to .github/workflows1/pull-docker-dryrun.y diff --git a/.github/workflows/pull-e2e-tests.y b/.github/workflows1/pull-e2e-tests.y similarity index 100% rename from .github/workflows/pull-e2e-tests.y rename to .github/workflows1/pull-e2e-tests.y diff --git a/.github/workflows/pull-labeler.y b/.github/workflows1/pull-labeler.y similarity index 100% rename from .github/workflows/pull-labeler.y rename to .github/workflows1/pull-labeler.y diff --git a/.github/workflows/release-nightly.y b/.github/workflows1/release-nightly.y similarity index 100% rename from .github/workflows/release-nightly.y rename to .github/workflows1/release-nightly.y diff --git a/.github/workflows/release-tag-rc.y b/.github/workflows1/release-tag-rc.y similarity index 100% rename from .github/workflows/release-tag-rc.y rename to .github/workflows1/release-tag-rc.y diff --git a/.github/workflows/release-tag-version.y b/.github/workflows1/release-tag-version.y similarity index 100% rename from .github/workflows/release-tag-version.y rename to .github/workflows1/release-tag-version.y From e2f009de77c6240b0e34317610f838c66e0f7386 Mon Sep 17 00:00:00 2001 From: maias Date: Fri, 23 May 2025 16:15:22 +0300 Subject: [PATCH 79/89] build --- .github/workflow/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflow/build.yml b/.github/workflow/build.yml index 6a65578eef996..80a0c28ad7816 100644 --- a/.github/workflow/build.yml +++ b/.github/workflow/build.yml @@ -4,7 +4,7 @@ on: push: branches: - feature_branch - # Trigger on push to the dev branch just try + # Trigger on push to the dev branch just jobs: build: From 87d84f0acd3fd152f87f097a9c90f23abe4e02f6 Mon Sep 17 00:00:00 2001 From: maias Date: Fri, 23 May 2025 16:20:03 +0300 Subject: [PATCH 80/89] build --- .github/workflow/build.yml | 2 +- .../workflows1/{cron-translations.yml => cron-translations.y} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename .github/workflows1/{cron-translations.yml => cron-translations.y} (100%) diff --git a/.github/workflow/build.yml b/.github/workflow/build.yml index 80a0c28ad7816..a4d7adc13cf4c 100644 --- a/.github/workflow/build.yml +++ b/.github/workflow/build.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 - # Step 2: Set up Go (Gitea is written in Go) + # Step 2: Set up Go (Gitea is written in Go) yes yesy se - name: Set up Go uses: actions/setup-go@v2 with: diff --git a/.github/workflows1/cron-translations.yml b/.github/workflows1/cron-translations.y similarity index 100% rename from .github/workflows1/cron-translations.yml rename to .github/workflows1/cron-translations.y From 87c847b86249a0520d19d4b7475e29bef41f455e Mon Sep 17 00:00:00 2001 From: maias Date: Mon, 26 May 2025 11:15:23 +0300 Subject: [PATCH 81/89] yes --- MaiasREADME.md | 102 ++++++++++++++++++ .../main/java/org/example/DriverFactory.java | 2 +- main/src/main/java/org/example/LoginGit.java | 2 +- 3 files changed, 104 insertions(+), 2 deletions(-) create mode 100644 MaiasREADME.md diff --git a/MaiasREADME.md b/MaiasREADME.md new file mode 100644 index 0000000000000..76431d75b7f3f --- /dev/null +++ b/MaiasREADME.md @@ -0,0 +1,102 @@ + +# 🐳 Run Gitea using Docker + +This guide explains how to run **Gitea**, a self-hosted Git service, using **Docker**. + +--- + +## βœ… 1. Install Docker + +Download and install Docker from the official website: +πŸ‘‰ [https://www.docker.com/products/docker-desktop](https://www.docker.com/products/docker-desktop) + +--- + +## βœ… 2. Create Required Folders + +Create directories for persistent Gitea data: + +### On Linux / macOS: +```bash +mkdir -p ~/gitea/{data,config} +``` + +### On Windows PowerShell: +```powershell +mkdir gitea\data +mkdir gitea\config +``` + +--- + +## βœ… 3. Run Gitea Docker Container + +Use this command to run Gitea with **SQLite** (simplest setup): + +```bash +docker run -d --name=gitea \ + -p 3000:3000 -p 222:22 \ + -v ~/gitea/data:/data \ + gitea/gitea:latest +``` + +- `-p 3000:3000`: maps web interface to `http://localhost:3000` +- `-p 222:22`: maps SSH (optional) +- `-v ~/gitea/data:/data`: mounts persistent data volume + +> ⚠️ On Windows, use full path like `C:/Users/YourName/gitea/data` instead of `~/gitea/data`. + +--- + +## βœ… 4. Access Gitea + +After a few seconds, go to: +``` +http://localhost:3000 +``` + +Follow the setup wizard: +- Choose **SQLite** (or MySQL/PostgreSQL) +- Set admin user credentials +- Complete setup + +--- + +## βœ… 5. (Optional) Docker Compose Setup + +Create a `docker-compose.yml` file: + +```yaml +version: "3" + +services: + gitea: + image: gitea/gitea:latest + container_name: gitea + environment: + - USER_UID=1000 + - USER_GID=1000 + restart: always + volumes: + - ./gitea/data:/data + ports: + - "3000:3000" + - "222:22" +``` + +Then run: + +```bash +docker-compose up -d +``` + +--- + +## βœ… Common URLs + +- Web UI: `http://localhost:3000` +- SSH (if enabled): `ssh -p 222 git@localhost` + +--- + +Let me know if you want to use a specific database (e.g. MySQL, PostgreSQL) or encounter any issues. diff --git a/main/src/main/java/org/example/DriverFactory.java b/main/src/main/java/org/example/DriverFactory.java index 7017a54a13e7d..442e5c5ab5f60 100644 --- a/main/src/main/java/org/example/DriverFactory.java +++ b/main/src/main/java/org/example/DriverFactory.java @@ -59,4 +59,4 @@ private static WebDriver getLocalDriver(String browser) { throw new IllegalArgumentException("Unsupported browser: " + browser); } } -} \ No newline at end of file +} diff --git a/main/src/main/java/org/example/LoginGit.java b/main/src/main/java/org/example/LoginGit.java index 9a86747073daa..796c69ae28e13 100644 --- a/main/src/main/java/org/example/LoginGit.java +++ b/main/src/main/java/org/example/LoginGit.java @@ -23,7 +23,7 @@ public LoginGit(WebDriver driver) { PageFactory.initElements(driver,this); } - public HomePageGit loginAsValidUser(String userName, String password) { + public HomePageGit loginAsValidUser(String userName, String password) { driver.findElement(userNameFieldBy).sendKeys(userName); driver.findElement(passwordFieldBy).sendKeys(password); From 15380807ef2076f2deed5cf7827915c7bc08ca71 Mon Sep 17 00:00:00 2001 From: maias Date: Mon, 26 May 2025 11:17:24 +0300 Subject: [PATCH 82/89] yes --- MaiasREADME.md | 2 +- main/src/main/java/org/example/Main.java | 17 +++++++++++++++++ .../classes/org/example/DriverFactory.class | Bin 0 -> 2885 bytes .../classes/org/example/HomePageGit.class | Bin 0 -> 3026 bytes main/target/classes/org/example/LoginGit.class | Bin 0 -> 3252 bytes main/target/classes/org/example/Main.class | Bin 0 -> 1153 bytes .../classes/org/example/NewProjectPage.class | Bin 0 -> 6527 bytes .../classes/org/example/ProfilePage.class | Bin 0 -> 3822 bytes .../classes/org/example/ProjectPage.class | Bin 0 -> 2401 bytes .../APITests/APITestGiteaTest.class | Bin 0 -> 3711 bytes .../test-classes/UITests/LoginGitTest.class | Bin 0 -> 4454 bytes .../UITests/NewProjectPageTest.class | Bin 0 -> 4812 bytes 12 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 main/src/main/java/org/example/Main.java create mode 100644 main/target/classes/org/example/DriverFactory.class create mode 100644 main/target/classes/org/example/HomePageGit.class create mode 100644 main/target/classes/org/example/LoginGit.class create mode 100644 main/target/classes/org/example/Main.class create mode 100644 main/target/classes/org/example/NewProjectPage.class create mode 100644 main/target/classes/org/example/ProfilePage.class create mode 100644 main/target/classes/org/example/ProjectPage.class create mode 100644 main/target/test-classes/APITests/APITestGiteaTest.class create mode 100644 main/target/test-classes/UITests/LoginGitTest.class create mode 100644 main/target/test-classes/UITests/NewProjectPageTest.class diff --git a/MaiasREADME.md b/MaiasREADME.md index 76431d75b7f3f..4010e161ae96d 100644 --- a/MaiasREADME.md +++ b/MaiasREADME.md @@ -48,7 +48,7 @@ docker run -d --name=gitea \ --- -## βœ… 4. Access Gitea +## βœ… 4. Access Gitea mm After a few seconds, go to: ``` diff --git a/main/src/main/java/org/example/Main.java b/main/src/main/java/org/example/Main.java new file mode 100644 index 0000000000000..03adefcf12528 --- /dev/null +++ b/main/src/main/java/org/example/Main.java @@ -0,0 +1,17 @@ +package org.example; + +//TIP To Run code, press or +// click the icon in the gutter. +public class Main { + public static void main(String[] args) { + //TIP Press with your caret at the highlighted text + // to see how IntelliJ IDEA suggests fixing it. + System.out.printf("Hello and welcome!"); + + for (int i = 1; i <= 5; i++) { + //TIP Press to start debugging your code. We have set one breakpoint + // for you, but you can always add more by pressing . + System.out.println("i = " + i); + } + } +} diff --git a/main/target/classes/org/example/DriverFactory.class b/main/target/classes/org/example/DriverFactory.class new file mode 100644 index 0000000000000000000000000000000000000000..d6f1dd2c519b13fc7aeba4b39648f54a7db56d13 GIT binary patch literal 2885 zcma)8TXWM!6#g~|kt37~1_HU11_LOLCo-AX?Jz@JLi1o+q3@Xzo&ly7{gC0n$WDE zMZ*rXGIZVLt6Vp^Rn%v4cSYV~XuW7yhW92zb7E+|4KcJSP&Mp?#?WIsMP01%QrQ&x zxMQpeXOibV+gWFb6&<5+r{b6l@$@!q)^iN2n3O;r8agG4l5_0)u5eUZ+od6n-3*;Y z;mwMY?TG-E;dJ78l%cc?z%C2x9@kxA3d^XJ^aYU%HYFwEUJcz6v4arPcAlHTHwF6{ zG(Rp&c>3Jzl!|@ml|1w@?2U3ZFD+itZ~(6|?C|Wl*)%bh7z*MFP|`^S2O0Y6fwSwD z$JZv-@}le+wx!@O!-1MXhMP;aQxXM&tFt-6aA=#gDbo~1ZjL#{N=aB=%`S#x6vC9X z%1xs%AQ>MZ7!`x)jbWIImtS`5l29>%Q3WS7=s4L><)9q2B<@wX=}r|b+Yu@5iWhKj zQ^9Kti746wS9;3#IOC`4syKz_7~Wt|M@N?hFPOsh7td-qhx1ecUMN(vav4&ITQ6H> z-<>SC?~n$eODaH;VK^#6#}||y=&Gg?6&G+x)}1t76S)Zj%VVn?ztxU zxIz8n%Iwtm9be7!SWxhuhDDh}U5m=DyPhbK%IRneYc+;jREW#7GYi>?SrxbOfr2|4 zJ_M&0xhLuw2%29qJlYN0sHxmWUPA%2snvESOnF!u z_-ou<*G);7Eh)P|_MK_N64RAZPB=FL|8c)L&2z_)^Kh}nTQ;aVeZCGO8!bV$QThRU z3_HU9#>|)*wFDo@`SDd_+)BA@JDw;Eg!j^g0oK`y&sBVZFBN*O^gn51Ej8I?* zk>aMAH9SG})21v-I4P66u5cB6$8hAioT5Ti@I&cL^GYR$kQnH!+}eq zd4J^j-XDZj>Zb-8?2vSIpyj%P%D+$*+)pG3gZ^BFMernJ z7G^h|$ySy@X4g&J%N*Nqma;oXWjarpC+muTGK@;b(t@U4U8Jt{nuf;x$btTN_6g=5 zL5bg__Y=G?%a!{JBahH7rN!#J#R*{#<*}C-=|&%ooAD9ZG~r`Bpm&U{Kcn9#_=aXG MjlRYA_z^w-1I9!7RR910 literal 0 HcmV?d00001 diff --git a/main/target/classes/org/example/HomePageGit.class b/main/target/classes/org/example/HomePageGit.class new file mode 100644 index 0000000000000000000000000000000000000000..bf74e9c03ab5a12f474654d592c389483bfb3b03 GIT binary patch literal 3026 zcmai0dsh=j9K91B8^S6Y6zdBSQIkMfijOL>Rs>XRP-+mW*3wBbB!ipXxDN{2ckTQA zetm`h(e_k@_MCozeyE=QW)n!XIRNKmcV}nry>ow$*?<21^KSsd__+lkG-znl(S&A( z9k!D<#3C=2OkrHGi(-=J#d+y5H0K<-ARLB$DK*C~3F|gDTww}J`bA?#WJZGt$yS8X zq9LNA6*|M-b!QW9kz2&U5Rb*zNA9^?@}zCK#IPA{8n)=ziYUXubs1JyF@!x?6t?fV z42cc7rYdujP2`jMi$u_Y9U7j{u@k!(qVs%#8w%1G^&PI1F|^ooX_2+99C7T3U5uyx zKZ(@u!CnoWI`*N9;n4c(S9LIKmJ}43m7cjY!&O91$LhgvWa27dGK_A9{RPh}4H<@M zXSrFhU2o{fz`%gvyTYNdytE7z&K?~HafqQIFNk-0h1cX(-bj0nwDQULbPHmLYe?wm zMIXbKVCUs2ORgu1w3@u9)n(DrHYRDMN9zSI21(Pe!@vN;CSn=!9YNuv9wFeU(1!d4mio&$i9-h{5LZOEVeTqyJVGL2gM!8$a*xboQa0<_8 zIIZJZoOx7#z(^}8upXBd#ddeC1tSISq{VGtSXq&bUytA{Ml_7-7{fV+E*0N--;y5v zmZV3<@{%-$U9vbxXNCw59;O_h%AhfJJw6@51&nLBsN*@L7zXO)i0hY1w&NMTG*ULt z@r)@(>|)8b$TuphQ<5l8lk2hgbQqUN$VQ=7tzc5e^SDCJWwzHPPQ;YW{X8HSwnw0GcU3pTiq|RWjN4q-mt2>m`-xb2{=UP=b+=iZxrx z+pf+FW1gX@$R&5fprVKwM&ia9nR}+&;tLt>bl)^`a^c3{+Qlt#%OH!C6P6BJ+0e9D z;$A^j!)+Z7C!t(9o1H+Rcg|6Ww6mJNOFE> zKv?IfC7!T!RY?oNj*Km4Mfu#*@ClJrJK>n)sHBamqLSQ{cSJP(2S6NeNHwfNG~LZ%^4ZR;rFxJ~&nd)x0D@dZ}#tcriGtyEZb5bXQhnJUSL9>ds%U zftACtDyHT`B&p&MN!z}Y73U}ss8iRx?N{!Q+;Phi&WNe{Dp{>nJ{-u{)zc6AsqQY& zvED#e`tqT>kSanjycyiTg{bO;^!#@4JVA3B@eWcna*sxC(Mm?wV~Ib&R-iGgU=y8H zXkW(m73>aSM!kvdU%`P8e#hbRyeAnR;HlpN$am>CN}y056!d=(yKxkI@g9xnWpKQY z59p~89};mWAU;D^MI0>y9;XC2`2fjf3|CPjGzYZBtvFDF7OkLt6d*EuOgL0L^s6>> zjn=4D+Y=9QJ`tU`kIRYP`(V9^Wu&Xn9pn~ph$OWmg2QN|V}BbG0Zm64ph81XfwPPV zK3(%|xZ+!TBCzM$GH$GZhj1UFN>bL}Pwp5s`r9kO44>iiifZMGa-(z2VKRgqu9_ps zoL^{02+Hp=@*v4RQiI&NhWrJ-tRUYbp$)X+c%bvvGKwoGg^=o90UfWw;L_^gL|-uY z7w%qDFCOBxU)LDRhMgeBlVr#cdXOZ$QUQBcnW4hoMs|LMuZh2hcK!|B(WiMO9lynQ b0pj=gfv!<{vzfa1kIgOgF&V~B%`N`{Z|@gU literal 0 HcmV?d00001 diff --git a/main/target/classes/org/example/LoginGit.class b/main/target/classes/org/example/LoginGit.class new file mode 100644 index 0000000000000000000000000000000000000000..8d65a046b0f8076b916912cb4777fca64885485a GIT binary patch literal 3252 zcmbVO`BxKH6#gb46T&DpDp*%aT_7sKtyQBaM5zl^YY-G`Jwx(@hm)B&3rbhJ@B7}` z?f3rB_SA*;v_JRskLv07CX*13v3klmOy10U@80iz@4NTDzyJB|PXPV+A%PegbTk@R zfF=#SjysWdO2WQurafT^TL#6n7nDkl>!$;m9&*frIc|xpQ!F{Quzd|pd!;S?J`D|B z-6L_tH7uL-{nDOv+H&%yHR*W%p6$K8z0F9VMTcQvAr@&^syvCSX0c=mnw^mLW0KbN zanlp0PYr2E4o#WUX4*3CiFD3)r9F{};{grr(k=!5Iom9XeVu_P+zV>hc|L(8mgrb& zU>VvpwAG7bU`9hr-t%${E$=(7hRt1fy6GOOzc-^oSZ?4!tkBS^Tpy?BK`E?)GQ9k5 z+u~S7JhiY(rsrL8+(PGhWpa&ywV}z%=g4Fn4{7Ke4}9OTdji>0a%ItUXL_P9{*^6P zwpOWAnXz&d4PktZi?X%B>(24>XM1_K+>#e*uia#}FvwRM4xit&Ttf=mJ_Y|^pW zz!vmq*jSH^iY88)6JpR*T#^ApDdCVMiWG*YVOLjOM>%1-`N^zf`{JsfsiFVG_!Lhi z(>>CHUToE|&A@i-(6G85fGS*`=tXH4BDWg$)b~0tlc|5MG!*U4=y-$&H7C35r0M3w zi{Us6@M_xz4fWSpos4#kEGJP;`O@&NDvvV;g$U%WV+PjWMgw9(;^plV} zrVLzyrD4N=qp#p#a!XcAndf26jGC%i_C*ZOH-9e@D+XCl3Am$fwN9(@#tP25td6Q= z;4)Y`8YmVP_}YVwWYRs-3?G4xX#-bqb-p%cJYN*Ko78i6S!2>kpJY|{xnGz?a?*>Z z4LqYHxsYD6f$Or2oOZ1Qp2PDxUNCS?L0A&9K7Tg_%HnAI76tkeUe@u7fmiVwgHzN_ z1uRQ^mZZ;^%#uv^dyFnrl7<9pF<*w=fC_Bv8tWb*09Gf@H*J5!w8GC>r@-0PA!&=_ zL2+ET!>S9aCZ&4Zi0Ml89(`=|CnZn6E!1))hbt{ELuNu+`#l<$h0}DdVSgP)?@Yz= z!B#BRR0SH1SNai$l|I503|);%fAWYut=wf@Q6R0-w1{x;|L|H9$3p3aZ-b_^L?OHY zjFCc%cLah^lV(AEPaL|M7v;p&@g-@Ts~U$~S9RfLRbEU#a7pRWx+S2}Z|dDa_SPr5 zkE|qePT=O*qt#(8tYGg^0NAdM*tT%9mJ$Hj(4*o)?3E0`L#&oDrv3sx*+e-?s_P3h zyv}h9I{$ec;FxVS{EewT%=adKVU_0d4ZdCDI%TIfbqiW5soy|zD%pA)i*KMkm0TGP zR;Q93;h;0M=?2zsO5H~H&)gHkn|yX6&gU{TqLr8yV+oP0;&VOP*sj}=CXTnbqOI%) zZ{r=l(PM~PBaV0RUWDd4ku`AcRO(l(=YRVw(lIptft_a?HsxmVXbjQJ>YAC&^JY53 znOW@9@H-BiRqJnI;3rxw<4qDNh;Ri~V+Yn?5FH`Dj7tIQuC-5*iUx&@)ybl|2hRjY;6N>e6RMXX{ zrmIm+SEKqEpF~mZ4x7*YTou6VJ{mt9(*hc~aXL8E;(JS>t$T z)$wO^91GQaAi|%VkN-AaoU>Zao844urp8(_vi3P)Hxm384B;z|WB3}^!{2Z4Eq{~z SGDhuw*VN2j*^BR+n*Rmtenx}< literal 0 HcmV?d00001 diff --git a/main/target/classes/org/example/Main.class b/main/target/classes/org/example/Main.class new file mode 100644 index 0000000000000000000000000000000000000000..4426061088818e88834850e921106b9ba9ed38ce GIT binary patch literal 1153 zcmaJ=TTc@~6#k|y-L@qFh>3*88p1M4J$r6g4S<2cL#AmZ7^l&F&P%XMcq6 zKKQH;n2_iX@VEF2j8V^S8(pMvlby?%?|kPwXU=^6dGrOqBUCboA#NaHVhBlwu|2-e zEt|V7>*@BMXljOJMY>WyWQZ3_n`xwwHjptf4D%Sgao}s=5K48)X|f&?No76rq^ld+ z6Wl4MFv^fy6Sl1i+}$a>6n0ZNVlIO*oHCFzF^&m_@d3W1qZ2T_V5k&(N$WhvP6H_?NFy-*Js4BO~^_JATwDL7~wNLVkwZ3~aNFei!i5Z+_FhVu9 z8(<@``*KQ~24<-|%4=ET6?Zzeu-3UGbfT(u1VgqiUGb#rYzuFLZ`)+a)m4+*o7|JZ zzHdzET}g82>>r{sF*zY&z8KB@PkaU@>8}xvdoAJ^9{^(*X=vVTuk%hnV5XtEUQ?{f zKvFu8yb@dnrSe!Q?Q4&B)`i|xJAMil!;maID6ni2*D|<{8wPF$rM<;4|F@5%yRX{9 z>M840dzCk}@(vi@Mr+px_W0MRKWyR8*Oh8_JLQulj#!R4ZX9&P0C+U};|&ttaG#>e zZMz}0pz@kE*A-sX=Dsg{19uq~PUJL5s)73qv;T)uGxzes9L~`L489nsoJi7mo^}?^ zjOL-`PhcOy;{uJrF&W7XF#GEZxJbJ+=CMGQ!1*=eA?eab7`c)7XT%PX-AYtuQtvQH zwwWVL0*9D>!`S;@-vatL3N+@4I-nY%*FAwzvJGRAnm!1ZC(0~c?jn}Lz)L8iME2#- kBlZJX_MJd+Tp~jZmvM#W6hW`jzk=Je%h2i$?xBq7-!Km$*8l(j literal 0 HcmV?d00001 diff --git a/main/target/classes/org/example/NewProjectPage.class b/main/target/classes/org/example/NewProjectPage.class new file mode 100644 index 0000000000000000000000000000000000000000..0cbfc091cc81bf8b583b872bb55c882a358242ef GIT binary patch literal 6527 zcmcgwcYGYh75?TdYvt1-*(Z0|a2VN=PL|Hbrs=S;EEjC#0una1pf0&8q%Bxx7S{B=gsHM3^kD&~@Iu~4ubFIlvbeYTM?hO%a_ zoh#URGw%u1UTWnnZ==Ahw)TB>s1t~fdS0PBnatX0BRgulUiZ2+Yt|%-uIcdIh?Sp% zDC#xnI?h6az*4EyJZ|I)Su?rYJhs=dkCSa}BvpsG0*!-)V;O@+(X$7w%;1_RVrbGZU&jJ06j&H$(&ll2h?Nmo-8NlndtdmJ zl*GMQ#}X_Rh*R;CJPx%{qFqg@K)MtTEFOI45*<_nSjo)PPhJ+pt~3WdXW*R%gouDHFHcPSK#8dP(}Tw;iN}oI_4#-)hpMcs7D`(+9AwspNh`USG*vcszhQZ^ z$#n8>b`(#H^hhBy|r?QHjfOc|641d4~G zz+oLDQd*royvxdFEjNk-uq2%x5!e~-+cLahHK&RXQ`x>RMhmh!av;drMxl^p{G@#G z;nd0HQwA12E1MiH=F`%^E7#S&p{9bQV1V@9^968YsiULiH;Bc|8mvG$Ua)rVKjqG^Jocr9M1;T9dQ#~WB1Dg$|)e>HwQsUk*m`Y22^jGddo?XW7e2cO5CR zPV=|G;Bt~i!AkbHY-SZ@vEv}$@L|9yvR$odJ1Fb%06wqd3wV%lEO(3LvP~N|*(kC{ zriL%!%No9-j}e@S4iJJ;SW7lvkBc!H5*8s+8XQWRg;GubttgvCqnz zyH!s!ARBerHp@1ApKPD_9K5XYMlCvGnQAy@s2{Y9eTnI)L?auhhL>rhUT&#$tF*DI zcO{ZzDqL2EHZ#>ln!{+w!m0Si3nh%(9*=-aLkE?^FSU^x8vH^q5Om9=u~Or_+sM&F zT2OtMU!l@M*_;7Ysw#|<(0N2rDih=jTd@Gw+egz|X~g-isx9}~g6pPAL~nI_O;7tT zRa?!)R!^JD4KMS8*-^DLj1f<5(i#eW&tI-=n#>0EsfknkfY~!#B2pEoI~ZhscU+zo z^`CvFuk{}U1V=8i-2P%ZZMyDoF&l{SH*hss?iuMV%axl)nFP_T$J3_Ii5h34u|mXK z9mi%dSdukzLm8vx(V^C|MqvGnH92UQP^dAqjtufE9Q`otGTFDX{s_lc-1&t)JG8& zx-Nu>%oUM3(J0Uo^gIrEV?(PSVXbi^?{AFS+BdX{*29gpVqR3lM3W}w>tcam=d+^X zaVtM&A2pMG%HafN43~B%^||V&2dZ%flYBcar@pM|w)ENd(PE)`gAx#Pl{Hf)4lviN zhd=(0zRJg*TO9_0$5nj0A8mL74_v;*Sqpuj_%^=7Cqh;ZlC<|-n&F$%Pt&A1&566v z!~aE-xFUj@dvN7}Ssne8=#QWR#`komQe9EdTvpJG?Pd22M$Oj z^Kobbhvy?b0rM0_cdbsG#!+Arb_Dwa6wAX=%z|`DjLra$fEMF?8oUmdVZAap?&~R| z*@Pb`G>hqyAL2(e^T(X0({TUIPxwaQr)8wKalYJNZ@(Kwh4d7T?UI0E*H7R{3eoP> zohR|slX&_`JX?P0IF084rLWyJtC!T2zgOJ0lr8{QN=G+WEQM9r$h*sUbhAkTU+=3e z1K*CHDd6&0>F4+bVK!qmeu-ZZU^nC8*SxDC^xyoypl>Dg?F4Z-q3zNj+F8IXZ$5lR^YSDlx2akjS72T$0S}UsA>YQ*|_}HvOYhn zOiHnMczuL9epKm9_%g~m8}L`9a{-z4Z%XG<>iIkVLA(P0#DjtMOB5QQQEH#W8`)L9 zDlfn_N-VI-7xNxLqIe&-`nZcEGKrG`XT&}@iF>Q5 z%6H#5&A6T9pI?C(f>&!yR~^IHz`wh>I1X1xp?Qk6H14 literal 0 HcmV?d00001 diff --git a/main/target/classes/org/example/ProfilePage.class b/main/target/classes/org/example/ProfilePage.class new file mode 100644 index 0000000000000000000000000000000000000000..2a421a31c6be20b09b0bbb79c2ac29a9c567f667 GIT binary patch literal 3822 zcma)9`FGUT75+4gEj%N@3}6-);-ohAjBVsVOH&Ua0b>%VC_09WT&Zre1MGUCdj?l+$z_+pq%#-6u@j z3{EQ8GE$t|imeI;7K6Z@)OE|L32V{ugUMqP6BByNH$1K_n060x$g9vaY{Pa1d!BWkILgkuR7P=+u1-%-0roB+!ie3fB>gMthXW8%? zmUCmgY1plCGccO|fVjHo8I7lh^`RBPF*&oGZ|uV;bIp zcPi)-u4@sY7?KofmSZSyDJ(4Ti{cna^PvX;$F3Z9Jl^AM3(VMy>8 zS`}roC&VNas+fMzgQsy)#WNb7#VG~7iKDLs_ zsF>Dp7SAcz6-sa1!=iJgghlB0Bq_g^?>r`PPQwd$5BHk>bkhxp6|4V>{4%5AJTCBk z!H{l@oJ$Sty$TMcF@{-+8JWjLR5i@XuGCet%-WKQxd(fNP$~OMAWWO6_a`|&wJ5x*alK{OHKSa- zlEWwPNfn>c@M(O8b55drt;H_Nt4m9sE?iST<#W)5Bv6nO;mfSoqQBXZD^V<;)9`tG zfgQME+V%AgTuSHd>6H!LMs@-Ag>7ufejw~%PFSJxDW^^wJ2+*G^R4E*;myiHEhncO z!*jwj<$JuC4HiuXyFbilT7M%<3(l;=X&esCXdL&)j7$i0>W?1njM{W8BBvc8dKh8i zs414c5fbi5>dwyKx_^RDPD_qex*Jhptxi^2P$9h?Z~!=}}m zMuMKIxnPT+q9_u_Y~`DFQYMnt2?^!mmL0zzo~dl!|Qm1 zZG0U*(_VI#480PfM{}alImG0f$+v$ct;a%yH?RAUrT!fHu!~yvp`SJn;w${p7iq&+ z@io3tZ|IFeYhTAVVw?Y_{Vc!D+{4hzr8m*P8^fz8-ho~jE#1XY;5LrGg~^#WaANE> zPLH+myn-KL_t=&;DjB?mi|5DNcu~PUTnZK3!R6PeFbnD8AqEQqQotaO+Cv!T?*v9r zMv?zPjfZZQxVOwuzKL%UGP)8wT;S@r@f|ukz@6X4_ZZIi`CVIE`2kmc$dx>l|KOC0 zA(e-yEWPWFqkD-86>c~zBWvS|f;K+L;fDreY-2Hl%koRXZo|#6a%6U-+uK7&juPQx zbozMcrZh`Uv2$7cm{u}j-k#-Mek(*)$hN|b+gMq}$JaGRjF`kuoJeRZ#M*vB=`3~p zv^OJbnop7s&rq-ALw=Ns_qOrb3?#CVi!wwI)%8T@*AktN6P?8`!u`L*ufqGU@f+S{ lAb)0nzs2wIC;Xi&2lysA{|}sqEp7k+ literal 0 HcmV?d00001 diff --git a/main/target/classes/org/example/ProjectPage.class b/main/target/classes/org/example/ProjectPage.class new file mode 100644 index 0000000000000000000000000000000000000000..78e6b877ad19d5c46dae1ab7dc489551eca5a1cc GIT binary patch literal 2401 zcmah~3s)0I7`+pbg|Grf1s_$>DkeeQsC`&sZ3VH_;-e;lTKgEn5C%89aUTlppK8yk z720$91Nx(SdS|oIU>8kJHoLR)efNH^JOBLq=idOX;g>ve*kz&5#%}ZrRQ#an_-*Aq zlTN5y<>|QPgmJs=2aywNXWo~~a>-S*eyipwv9a)78p06YF)P4u5#`L{+en;_heHESW7Zg z5AM$k6z13DbLqI!YdW=JL<(mYLiC+`z-9YaR6fiV_C7xYzPdv+Iw18 z>m+}+_&S`yDUGjaTLdxujN2LSAoFs%-xG> z>3XuEn#TlASU73pL!1&glf|lA8k4RYvJv?KY1pP9bFON!KB2(nVkS^c$)K@1>w6J1 zQSC{?-6d0iYH48zlQ?6cXrqL(z|kxMuj#TBE81I5VFjkMQD-))+4-fT)V4Z=vp8qr zybZ_ntNF0Ke6#CF0*7U z=_UPGD(*Ao5xDR^IdNK2%g{OJv^&}nn#R3n z<6GRPDm4{(9LSpUq`~Vp9$z!9)M)a8477Pp z7yF`BO`3-indlBr&*W5T*YxZD_Icu9rXAWf+5VnZqi>5O1I*N-p5bRqE)N+dP>1HU zQM}F1tv6I>uq=@2$eVP}1%Xd39jxi5C!;uEjJGo(x=NXKh+Ww+@~ey@U-RRjp>AlC zz|o$(oHsNmw>Ldc1+%WH3&~lj1TcbbAL9g1jvNPc7q2`7cvmn-9|V*cTUh+@SmAvi z*C&EU_`4vRDV7Z-@@q}=BKtWCGZz2kIecj zT>O>xIT+MoS^&rSe-is~x(8_@MH*(jEqFxegHMi~=pNEe&~nmv+``8KTlkFQhc7m9 zZ3|!JuxQ>CZg1gk4sW9D;FTHE6w%Hmcy`BAir0rWQF2KRzvRC`DRfY3Z05y3@Msf1 yzVX_4bU`rY-^bM!e4<#`EO=1=fvcu1r&MHu?vto0IstfABvvPI@l@ literal 0 HcmV?d00001 diff --git a/main/target/test-classes/APITests/APITestGiteaTest.class b/main/target/test-classes/APITests/APITestGiteaTest.class new file mode 100644 index 0000000000000000000000000000000000000000..d9e1e2477d55aaad0236c589779b205c98c1d060 GIT binary patch literal 3711 zcmbVOYkLz#6n>{IY-qO>BB%wCQVOI6*@mQ4#Op z{eA=QmtUZMknlYE_*EZ&guleccalIul49Y*&g{&bbLL#$bI$zr@0H&H4CBXUG@#Ky zlZho*DzM_DoRgL#-5F~vbyB56fu(zF*ADL!XpD7FMGz5Koejg>pk+B;S~^)T2nQ3r zy}eNiY&OvXQ{awSc}k6VZd!)N?J&!~Ae3$x2yBie=dYLuecPQG>aN{dhUI88u)@Sj zLfgW_c8G&7kygup8RBLcI)*I+B zu>qX|eT&hcS_qYpjw7&&O3VkM6zib~x&&H>^I_KW?dOWVFtAymefa3;Bpni1<(~s~ zsHEPBASSRq^iCt8YMN5{c<}N)E*PcT3gRpP0_1wIh2> zY{fQ$E30Hi`2tQIT+}LfqIT<6Lb(jvVHxN(5yuXJ^;M44@V1EAP`TmcvpFTu^w7lE z5rGZWu&Jgjf~3zxKXwYVq$@>C#r~K1R!oUt7Xxs%qtlhMs&kODIy0_vUO7;m+d4XP zzC9;HeK;+hKy{qc0T?tfggvw@~eV>WFI^CMiWR)AiFg;=A1LZS= zb6%h+Moc__2T8#-E6mY4moFyLtOz+)7NyHU@nEA0a6q7=DylWqE!dAy6A$4K zH3_M!z|Pv#yv8;q9XlgKnQ~O^eTN0ME_7cV#ug+orVGi@o4&K0&_voeCJapKVn73S z+{Eo=5n72U6UXt0Kr?G=m=8w04ADLi8?A}`V%!kHWAvm3Vg!#1EWaL#&3F<|8F<=+ zM2a=V^JlEAoJ~`5$ZYe~VHu{g%4d@>SbwE6=?U~yLZe)zx|7$jmf7f#Br+P+wBU3l zTe-{B=ejAJ)rsU)$VI@)Zj@8488%KDIAy}Ytia0oLc7oN93_b~V@^7GH8w49d+f2w zQe38BEvETvOF3iBN?Qij_5Rd}blQZk6KQEiIVz;#OT06#E~l+mTP{`3GaPd~Dhd&Z z$ecZ?3w8ud{McfvHnTYAd-_RmgaKxpOIT@3+O9g1pG_%$Qm2M)!unY-C4F13%bUzE zn}J=MT(FZ2QNuum`5fm=>X^?S)jpngLwi;QQr8>iPDb^r3ndj4lV~+jE zw`iEPPfZg_!;V9F%R@qI#8)hSx+DtRwE&auWTaoW!10*R7Nzwo#;lR=98nhjK+)}5 zxZZ7G9!+?8KdtuL+7qj*yXAHb1c5CJ+@sYvtk`@rS8wcJfU<&0`CUcodGAou6+}@O zgucv`D1!(-WaLHBMRW1CrTDlRpWssipXnFd=K@{x7`5Fw!ow=14RORr(SDf@J)dy7 zSeaO5!qOE7rJHe7(3SMOQ~BIbMWeo&e>FFh70-;75@?4*(SUG@x;WBP3;0}QT)(QN9JEI$;TN-~uLjm1Q_!;*UkZ3@3pn%;Cq`8-s=Kj+0 zzDAPoFW{hNOBTSFS^*Ci7c22+0mmBje)Q4kiOYDR#FB0*ZcR5{Mz(VE_`F3s(MnA_ zY0*Yj+Aef33R|!l+c*v&#y3tk4xoqqb1Tx^&Ep=Nr;q2|c%ke@ZFw8rc%JhG+Wz_| z-r)4+H5XheyI|~wE-2aTmJG<<$mYL`HdolPS;q@~w56Z6>|}hj1-sCT-5dvTkZtn_ z_EhLTwy^GRQQNmEt^w~9gW5t{-qmKM@gCmiL4=Es_hKM|!w+cx E5B>`utpET3 literal 0 HcmV?d00001 diff --git a/main/target/test-classes/UITests/LoginGitTest.class b/main/target/test-classes/UITests/LoginGitTest.class new file mode 100644 index 0000000000000000000000000000000000000000..a889f3f4f742feff3863cb42adb851835ec85248 GIT binary patch literal 4454 zcmbVP`Fj)B6+O?}$nvm60aM6=AS|+>8MY>X!NhA~BC~mGplLIfo}~e4M$C*XJ87Hl zOK7_9rTdcZZPH-u(57^6)9ugcZ~c1SNU~%Y*|GxG*fIj>? ziY7E`XwlJ%Hi3@vQF`jvGeKNtwB< z55k-dvUB^1C7uYm0GA=#eGm`4%|QXrPBL5}&Z zWoLS#*ob>H#B|(?O#)jTH)F^-GhfI_W6-r`r8{h`sTMW|{CM0_hRoucmvbgzjuUXkr-W!=@k4N)Y} zrJ-BLKI~^5f-)$R#$eGkm1j(^GczVrj-4jPmc;35}p z9|G$w7Su{ver|rsw8)3vM40(CYPzdxFv#K&9dE-UEJDe$(@sesv1VeX0!eBg#W4-X zb@Zq{*tL2TWhIs%Z_ZhH>shHta#BYxPLbE-q`>A%G(j&_h}|`*p-*6cm~pRIC^)Wf z6s;OzRbHy~YK`JC45>C97I-AF25Cbx$?koE1U8K6qVGHQC11|@iLR4-CoRwN<71XD z_dXrPX*{VRsbdsp1Ukc9?Pue)&J|2Q%UHs~40W!5o{fDD=QUi=F@|x0gJH(&@-Q@4 z-~^KC0TR#(T7|QOU7eS zW|_UMMccP>462flBA<+zqMcHX8^e_!bf-4%$`iIn!#e~X3lAb8_zYjiOLQh~ zmA#3lYVJhwF??LZ3p%dh6WqpC0WKH0x$|0J_q&E!u#7&B`*@|>qGs?g?iSf&or#Mf zu5+k-l6lFSmgz0l=E=fOjVmHVI7@i}~+qzkgt=S`{%O%Oof)c=v1C!D-INAmFu z!C~@6d`ZKXb$mr7XiGhv>g4Emkh+XakJw|yR7!f@Ofi?6kKk+U))m>CmT_-cqMXK{ zr1eRR;Ohd2;G2weR0YjQBltEa;R;jbLS&^K_p>stjz+ebmvPIB%Y4Bn_;**=C@}LS z$4%F1d|#la0mih$iZ6qhcA70((KlULhE!YBOFDk2Mo7!mqS|rSak6^8Y5OdTs&LDI zljdzh(z4~5Vt!h>eXDw2^GZ}Wg>mesR=})lHTS~$9zB_bR zsOwHON2%5^tG1*5V2dJ2L$zvykqXVyC7t$!3f?&jDbDt;k7d44jb}L2!W|Bt2oqWNIn~4&2?g{gRgCkeSNTgN;5<*p+z{P=-}dLtEhf2I}faPQ~>~F=*1NT9z$G zj{>#oOss1!>fEDrh7_w+V=J21ubrz9kxeH+chD*E*tw&DlYKKBQk4*+ zV@}ac$zhH|!Uf(|zAPSA=@rmNY+JemIW@wVH?4BoX4_Vej65fn4|3SS4}&HiiktbL zUkAK4sXc-BnEHf)z>k78jg3!Yqm9=ebLAN2I1SLzeG{TPrrkjM%YooecrBakL<_d! zr+n7SqWBqp&L@Fi&`h&3BN8;Jps#f=V#5t=?tT@Um#|e}3ER0*V)r8UF5#_Bn5uho zSiOFf8vuo4+7eDQ;T9fyNMt>PT)2Cn!i*Te#5)K>-^mml;i?4sY=<&M3iFB#hzQhdy@MW@c!6` z7xB?rb=C(NKS;Pk*o?!0tDR-diZePZ_*;@dEMwgcuzuG7>&4io7VsH`^@Z41L$Dqt z)=^>|Yk>88{NXOFKQ_R+9{a{}T;B@8I!UZvVx4M$6&BZ@8eqK`yS|L|oe-=6Vhs{& z=uKe#xdGPoI;`)7V2u##G_jt16Ig#)#yZOUs&^lvJ%=>((zj}*FgSn!SxONo%e0zQJmL*w6&A)+wf1`kMjPnw)X!4Njt}! literal 0 HcmV?d00001 diff --git a/main/target/test-classes/UITests/NewProjectPageTest.class b/main/target/test-classes/UITests/NewProjectPageTest.class new file mode 100644 index 0000000000000000000000000000000000000000..935e370265f0047499fe4233953bca8d0c520e8f GIT binary patch literal 4812 zcmai1XLwWB8GerkSC%hJAtV?Gf?%*6YNt>p-P50hS_ul={e|`F%D+x(PHh$zg&i&4J-tYa^IgkDCp+^Ap z;6FiBpi)DXj%utDSa;T#F(L`Wnu;8Yo|Q3AU{$wincg9R%7(^?00IKxY0pa?j6@Q4 z%t%bzu6MAbwY4>pcBR9yDbuP!5Vaa~9jmcMpzg%rxO6=?G9qV39b2g#HKwE*qt+A0 zhXg`Hg@wmF$F!!p0$3+7qLy;GmeCoFH@6$D`Sn2PUJ<(O7G1vuxYn-W=_0 zZ)@JSueH5-e{^rO#hP;LbIp^Elr2UowFFp5$8`!-6&G#~;(Bb4`$G9fK9os686(X2?9qF}R* zE!av1%x&rdQ3lSAW$(9KaJa9MsW;ZbqOV zfS#G8lnc80vpSj+{-Afo=X|tG&w0pS6Ohq z^E6=)M>X83V+g|nZRL~~@!3C@VhYQ6ABi#jxDwdF6i7@|c%qKu7!$bp8Zec&Nl4oA%mj_f5t8OxWHN2V6!6GE?tyR$1t?qj zx-^^+xT)MCO!NM%xwRO_NgYp8F0c567jOt_CTw(PXmKNpjJHrC+DxJ$!RbUYPL zD=EEW^R6e8jC_hS^0UxPJ2J|`=&?LXBgyg@WgQw(l`cGMI2KE0IK^tf7dLF#UN~VJ zaTyOH4yj>M$CS#Y>wGIqRS9S*r8r?}FzHEUalQr)sd9e1=>;*3b1KNmkj!Ts=gnDqi~RWXiS}MSl4_ufqWouiEb^jCntNmm(t(Y04xG({KY| zi3$v>$F}wk1!7*u1w5VP`Z{{t2_s>~Pq0x594?a~MM043LfJ6QFM5Zal&W=+5hl$u z@hlB@>v%Sv!}3r}Talc=+9`Y7X5X7M6aHj@%{fZ)YKuNn?ep+_4KL8~LcC~++9Elc zlvAtPsjEPh)thg&)cX>=RKv@3yd1B%T5n#Cg;41&?bJ+zC5TJE`|f(Bj#uH;0&A?2 zE-$d9#BWPx2Jl*e)oLry7N&U$Mi8&V>ovSV#~W41))f<5I$I#fV3E$a=_Ow{dGQ!YEW?@6hp1CALO& z_?R~?xiK(2F7;_$Xatx?|~BOuFu5I+6RH^)Gi|r-S%7E^2r{$0zV0_hO2jvuWKPwRM88CG>Ztx9ffj`b|)O(pIxvZsp^rkPOOc9n<}B@abd zoBYgKDn&*4grd}H_9E9aERPB9o7rc_sd(*>X~~gvGRhdqHl)yy+O$p>j;Y>rgH?(I z6{yQ^RJlgAE4>pbf}ZsoOT7h%2lf^NiTJVI!5JD|n@axf*`V;@~$GOL~!E zBQa?^Ng3zf`ic-ecU(2$q*NOkvfg8{KlwW>lD@+SaCHRtN@|k*Mr@i0)~jSLNtk?D zxq70CPfppojNW5TTsr(-J)}qF}OeD`s zU|~CtNfqQZz$?#6igtVkpY`u-{{H=Q_`HAr0>0?q*=2YSsk0>nzT}T-yz*4X>ne`% zD9h`Y`PN5$EOl7lbP1vo0P!0$<^E4U}UypbDD_W(ywUo1UG7ui|Tb z6Zkq6Rw{)eNaafYeA8uYSU_FVgQ#1?O#+M9sV+?dYAB>FB2vK;+Hp#~Zot0F=)8nm zhi(bob{V~wamOM?Dp)nghxaUELa=Sp3;RRM27Ew5qlz=%4Y80)bUoxBcW7v&l$xf^3V=bb?lQap|+!ykM{1?YHoC@HFe68Z}kMI*dDawD! zyTH%*T;bDyum2qwX(9`$kQbWCU@n7aWboV!Uc7*NIDAj&H5uINKfEb}xA+fl&EW0+ z!@Dwgk9x@9{n^`xF5_bb-|Zl5aGQA}+DSqO&D+cCK6GP0UEhgep79F)9LX7`(5@xI zpY#3;;(dG&zvS&#S72Yr!R}rW_Cg-^r5x;Hkc$P7b<_*oN|1*L@-RW(M#w!pb{;7L z*S$QrUlZJKu7FGCz;&z$?vpui#h8kS+sH5mjuO+I#5BYx8776JMR+=v$Maj_`P~&f z2l%GKCP)V{6&?{Nn4V4U`xrF$7pV>wsa8?*d(N)JA9$_6AN^RW<>;UI|9A|4#$WiM ajso@EY5a9n4I_CQ{>J;?@lX64HU9@IYg%Oh literal 0 HcmV?d00001 From 72e7298d66e6a694498321d886c0c4c8f8fe2dc5 Mon Sep 17 00:00:00 2001 From: maias Date: Tue, 27 May 2025 18:54:12 +0300 Subject: [PATCH 83/89] yes --- .github/workflows1/cron-licenses.yml | 27 +++++ ...n-translations.y => cron-translations.yml} | 0 .github/workflows1/files-changed.yml | 98 ++++++++++++++++++ ...{pull-compliance.y => pull-compliance.yml} | 0 ...docker-dryrun.y => pull-docker-dryrun.yml} | 0 .../{pull-e2e-tests.y => pull-e2e-tests.yml} | 0 .../{pull-labeler.y => pull-labeler.yml} | 0 ...{release-nightly.y => release-nightly.yml} | 0 .../{release-tag-rc.y => release-tag-rc.yml} | 0 ...-tag-version.y => release-tag-version.yml} | 0 .../main/java/org/example/HomePageGit.java | 15 --- .../test/java/APITests/APITestGiteaTest.java | 2 +- main/src/test/java/UITests/LoginGitTest.java | 2 +- .../APITests/APITestGiteaTest.class | Bin 3711 -> 3711 bytes .../test-classes/UITests/LoginGitTest.class | Bin 4454 -> 4440 bytes 15 files changed, 127 insertions(+), 17 deletions(-) rename .github/workflows1/{cron-translations.y => cron-translations.yml} (100%) rename .github/workflows1/{pull-compliance.y => pull-compliance.yml} (100%) rename .github/workflows1/{pull-docker-dryrun.y => pull-docker-dryrun.yml} (100%) rename .github/workflows1/{pull-e2e-tests.y => pull-e2e-tests.yml} (100%) rename .github/workflows1/{pull-labeler.y => pull-labeler.yml} (100%) rename .github/workflows1/{release-nightly.y => release-nightly.yml} (100%) rename .github/workflows1/{release-tag-rc.y => release-tag-rc.yml} (100%) rename .github/workflows1/{release-tag-version.y => release-tag-version.yml} (100%) diff --git a/.github/workflows1/cron-licenses.yml b/.github/workflows1/cron-licenses.yml index e661ca9458cbc..c392a0e4982ef 100644 --- a/.github/workflows1/cron-licenses.yml +++ b/.github/workflows1/cron-licenses.yml @@ -27,3 +27,30 @@ # commit_message: "[skip ci] Updated licenses and gitignores" # remote: "git@github.com:go-gitea/gitea.git" # ssh_key: ${{ secrets.DEPLOY_KEY }} +name: cron-licenses + +on: + workflow_dispatch: + +jobs: + cron-licenses: + runs-on: ubuntu-latest + if: github.repository == 'go-gitea/gitea' + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + check-latest: true + - run: make generate-license generate-gitignore + timeout-minutes: 40 + - name: push translations to repo + uses: appleboy/git-push-action@v0.0.3 + 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/workflows1/cron-translations.y b/.github/workflows1/cron-translations.yml similarity index 100% rename from .github/workflows1/cron-translations.y rename to .github/workflows1/cron-translations.yml diff --git a/.github/workflows1/files-changed.yml b/.github/workflows1/files-changed.yml index ab996616c8442..60bbb085bf38c 100644 --- a/.github/workflows1/files-changed.yml +++ b/.github/workflows1/files-changed.yml @@ -96,3 +96,101 @@ # - ".yamllint.yaml" # - "pyproject.toml" # - "poetry.lock" +name: files-changed + +on: + workflow_call: + outputs: + backend: + value: ${{ jobs.detect.outputs.backend }} + frontend: + value: ${{ jobs.detect.outputs.frontend }} + docs: + value: ${{ jobs.detect.outputs.docs }} + actions: + value: ${{ jobs.detect.outputs.actions }} + templates: + value: ${{ jobs.detect.outputs.templates }} + docker: + value: ${{ jobs.detect.outputs.docker }} + swagger: + value: ${{ jobs.detect.outputs.swagger }} + yaml: + value: ${{ jobs.detect.outputs.yaml }} + +jobs: + detect: + runs-on: ubuntu-latest + timeout-minutes: 3 + outputs: + backend: ${{ steps.changes.outputs.backend }} + frontend: ${{ steps.changes.outputs.frontend }} + docs: ${{ steps.changes.outputs.docs }} + actions: ${{ steps.changes.outputs.actions }} + templates: ${{ steps.changes.outputs.templates }} + docker: ${{ steps.changes.outputs.docker }} + swagger: ${{ steps.changes.outputs.swagger }} + yaml: ${{ steps.changes.outputs.yaml }} + steps: + - uses: actions/checkout@v4 + - uses: dorny/paths-filter@v3 + id: changes + with: + filters: | + backend: + - "**/*.go" + - "templates/**/*.tmpl" + - "assets/emoji.json" + - "go.mod" + - "go.sum" + - "Makefile" + - ".golangci.yml" + - ".editorconfig" + - "options/locale/locale_en-US.ini" + + frontend: + - "**/*.js" + - "web_src/**" + - "assets/emoji.json" + - "package.json" + - "package-lock.json" + - "Makefile" + - ".eslintrc.yaml" + - "stylelint.config.js" + - ".npmrc" + + docs: + - "**/*.md" + - ".markdownlint.yaml" + - "package.json" + - "package-lock.json" + + actions: + - ".github/workflows/*" + - "Makefile" + + templates: + - "tools/lint-templates-*.js" + - "templates/**/*.tmpl" + - "pyproject.toml" + - "poetry.lock" + + docker: + - "Dockerfile" + - "Dockerfile.rootless" + - "docker/**" + - "Makefile" + + swagger: + - "templates/swagger/v1_json.tmpl" + - "Makefile" + - "package.json" + - "package-lock.json" + - ".spectral.yaml" + + yaml: + - "**/*.yml" + - "**/*.yaml" + - ".yamllint.yaml" + - "pyproject.toml" + - "poetry.lock" diff --git a/.github/workflows1/pull-compliance.y b/.github/workflows1/pull-compliance.yml similarity index 100% rename from .github/workflows1/pull-compliance.y rename to .github/workflows1/pull-compliance.yml diff --git a/.github/workflows1/pull-docker-dryrun.y b/.github/workflows1/pull-docker-dryrun.yml similarity index 100% rename from .github/workflows1/pull-docker-dryrun.y rename to .github/workflows1/pull-docker-dryrun.yml diff --git a/.github/workflows1/pull-e2e-tests.y b/.github/workflows1/pull-e2e-tests.yml similarity index 100% rename from .github/workflows1/pull-e2e-tests.y rename to .github/workflows1/pull-e2e-tests.yml diff --git a/.github/workflows1/pull-labeler.y b/.github/workflows1/pull-labeler.yml similarity index 100% rename from .github/workflows1/pull-labeler.y rename to .github/workflows1/pull-labeler.yml diff --git a/.github/workflows1/release-nightly.y b/.github/workflows1/release-nightly.yml similarity index 100% rename from .github/workflows1/release-nightly.y rename to .github/workflows1/release-nightly.yml diff --git a/.github/workflows1/release-tag-rc.y b/.github/workflows1/release-tag-rc.yml similarity index 100% rename from .github/workflows1/release-tag-rc.y rename to .github/workflows1/release-tag-rc.yml diff --git a/.github/workflows1/release-tag-version.y b/.github/workflows1/release-tag-version.yml similarity index 100% rename from .github/workflows1/release-tag-version.y rename to .github/workflows1/release-tag-version.yml diff --git a/main/src/main/java/org/example/HomePageGit.java b/main/src/main/java/org/example/HomePageGit.java index bbf9ea19af975..1ccc77b272a1e 100644 --- a/main/src/main/java/org/example/HomePageGit.java +++ b/main/src/main/java/org/example/HomePageGit.java @@ -57,22 +57,7 @@ public ProfilePage goToProfilePage() { profileImage.click(); WebElement profilebtn=driver.findElement(By.xpath("//*[@id=\"_aria_auto_id_5\"]")); profilebtn.click(); - // Initialize the elements list here before accessing the elements - /*initializeElements(); - // Assuming the first element in the list is the profile image (img.avatar) - WebElement profileImage = elements.get(0); // Index 0 is for the image element - WebDriverWait wait1 = new WebDriverWait(driver, Duration.ofSeconds(30)); - WebElement dropdownButton = wait1.until(ExpectedConditions.elementToBeClickable(elements.get(1)));// Index 1 is for the profile button - - // Wait for the profile image to be clickable and then click it - Wait wait = new WebDriverWait(driver, Duration.ofSeconds(500), Duration.ofMillis(500)); - wait.until(ExpectedConditions.elementToBeClickable(profileImage)).click(); - - // Wait for the profile button to be clickable and then click it - wait.until(ExpectedConditions.elementToBeClickable(dropdownButton)).click();*/ - - // Return a new ProfilePageGit object (you need to create this class to represent the profile page) return new ProfilePage(driver); } } diff --git a/main/src/test/java/APITests/APITestGiteaTest.java b/main/src/test/java/APITests/APITestGiteaTest.java index c98bcca87d240..66a1940330cfd 100644 --- a/main/src/test/java/APITests/APITestGiteaTest.java +++ b/main/src/test/java/APITests/APITestGiteaTest.java @@ -17,7 +17,7 @@ public class APITestGiteaTest { private static final String owner = "maias"; - private static final String apiToken = "ba31311e2491c43ab847ad33f1ba7159ae453fdc"; + private static final String apiToken = "30d8417411cb86e107307f3abaa3639954bdaf12"; private static final String projectName = "newRepoAPITest"; @BeforeAll diff --git a/main/src/test/java/UITests/LoginGitTest.java b/main/src/test/java/UITests/LoginGitTest.java index 281d71b95b5ea..a9053da815f3f 100644 --- a/main/src/test/java/UITests/LoginGitTest.java +++ b/main/src/test/java/UITests/LoginGitTest.java @@ -52,7 +52,7 @@ public void testInvalidLogin() { @Test public void testValidLogin() { - HomePageGit home = login.loginAsValidUser("maias", "maias123"); + HomePageGit home = login.loginAsValidUser("maias", "Maias123"); assertTrue(home.isLoggedInSuccessfully(), "Login should be successful with valid credentials"); } diff --git a/main/target/test-classes/APITests/APITestGiteaTest.class b/main/target/test-classes/APITests/APITestGiteaTest.class index d9e1e2477d55aaad0236c589779b205c98c1d060..a8789a6390de4e2a0a6c35c23f5fa57de077377a 100644 GIT binary patch delta 99 zcmew_^Iv8|D3gYwqx!(3iMwxk$p$A}5V!ybZHbX2 zV}jljS%!%Cops2Hkyxg6^AHHaj!RhJ%4??L9o};%@PU{Pl+?4%qA07VFP_)4BFxVr zgpXKc&VA;5LWQImmR>^DU_7-LHH&KI*LkKfB4Inhv=jGSSmxHw@CsJB(p7(^7g*!k zX1rj65)7G<8q{xJD5ER)F$hGdIEDa*4D~_lHKuwmU$>4qqMBg6s{)%QSfwxa=Ub#W zNePmYXOOn=c;tVvg2%0Xo2sv|)^*mp5j&$;JK0|?*;l%H zvM<{}M+i+5nmGsao5g(6)sru@VUCh{lgwM^V1EDClmr{5PoA6q7HFU-I3)UnwgzvU qgOD}Y-jtbYO-=L1ei#>a4Eqzi^q2YXeYATHi9z~(`UL%fL!JWu`GA-J delta 841 zcmb7?%TH556vn@)wY}3`N>f9FCQTF{E4gkG_G3hP(yHoEEM!`uGtD!;RB;#+7MH@f6L?9?39P6` zO$%aGoey+nELD{HVYK2Ea@34d^BQ@QCfIrn1uCWcRwP`1aLRNmdnhnhr@o?~B5mTYZB}~`u+jiZ Date: Tue, 27 May 2025 18:59:35 +0300 Subject: [PATCH 84/89] yes --- .github/{workflow => workflows}/build.yml | 2 +- .github/{workflows1 => workflows}/cron-licenses.yml | 0 .github/{workflows1 => workflows}/cron-translations.yml | 0 .github/{workflows1 => workflows}/files-changed.yml | 0 .github/{workflows1 => workflows}/integration-tests.yml | 0 .github/{workflows1 => workflows}/pull-compliance.yml | 0 .github/{workflows1 => workflows}/pull-db-tests.yml | 0 .github/{workflows1 => workflows}/pull-docker-dryrun.yml | 0 .github/{workflows1 => workflows}/pull-e2e-tests.yml | 0 .github/{workflows1 => workflows}/pull-labeler.yml | 0 .github/{workflows1 => workflows}/release-nightly.yml | 0 .github/{workflows1 => workflows}/release-tag-rc.yml | 0 .github/{workflows1 => workflows}/release-tag-version.yml | 0 13 files changed, 1 insertion(+), 1 deletion(-) rename .github/{workflow => workflows}/build.yml (97%) rename .github/{workflows1 => workflows}/cron-licenses.yml (100%) rename .github/{workflows1 => workflows}/cron-translations.yml (100%) rename .github/{workflows1 => workflows}/files-changed.yml (100%) rename .github/{workflows1 => workflows}/integration-tests.yml (100%) rename .github/{workflows1 => workflows}/pull-compliance.yml (100%) rename .github/{workflows1 => workflows}/pull-db-tests.yml (100%) rename .github/{workflows1 => workflows}/pull-docker-dryrun.yml (100%) rename .github/{workflows1 => workflows}/pull-e2e-tests.yml (100%) rename .github/{workflows1 => workflows}/pull-labeler.yml (100%) rename .github/{workflows1 => workflows}/release-nightly.yml (100%) rename .github/{workflows1 => workflows}/release-tag-rc.yml (100%) rename .github/{workflows1 => workflows}/release-tag-version.yml (100%) diff --git a/.github/workflow/build.yml b/.github/workflows/build.yml similarity index 97% rename from .github/workflow/build.yml rename to .github/workflows/build.yml index a4d7adc13cf4c..deb5c945815ab 100644 --- a/.github/workflow/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Gitea CI Workflow +name: Gitea Build Environment Workflow on: push: diff --git a/.github/workflows1/cron-licenses.yml b/.github/workflows/cron-licenses.yml similarity index 100% rename from .github/workflows1/cron-licenses.yml rename to .github/workflows/cron-licenses.yml diff --git a/.github/workflows1/cron-translations.yml b/.github/workflows/cron-translations.yml similarity index 100% rename from .github/workflows1/cron-translations.yml rename to .github/workflows/cron-translations.yml diff --git a/.github/workflows1/files-changed.yml b/.github/workflows/files-changed.yml similarity index 100% rename from .github/workflows1/files-changed.yml rename to .github/workflows/files-changed.yml diff --git a/.github/workflows1/integration-tests.yml b/.github/workflows/integration-tests.yml similarity index 100% rename from .github/workflows1/integration-tests.yml rename to .github/workflows/integration-tests.yml diff --git a/.github/workflows1/pull-compliance.yml b/.github/workflows/pull-compliance.yml similarity index 100% rename from .github/workflows1/pull-compliance.yml rename to .github/workflows/pull-compliance.yml diff --git a/.github/workflows1/pull-db-tests.yml b/.github/workflows/pull-db-tests.yml similarity index 100% rename from .github/workflows1/pull-db-tests.yml rename to .github/workflows/pull-db-tests.yml diff --git a/.github/workflows1/pull-docker-dryrun.yml b/.github/workflows/pull-docker-dryrun.yml similarity index 100% rename from .github/workflows1/pull-docker-dryrun.yml rename to .github/workflows/pull-docker-dryrun.yml diff --git a/.github/workflows1/pull-e2e-tests.yml b/.github/workflows/pull-e2e-tests.yml similarity index 100% rename from .github/workflows1/pull-e2e-tests.yml rename to .github/workflows/pull-e2e-tests.yml diff --git a/.github/workflows1/pull-labeler.yml b/.github/workflows/pull-labeler.yml similarity index 100% rename from .github/workflows1/pull-labeler.yml rename to .github/workflows/pull-labeler.yml diff --git a/.github/workflows1/release-nightly.yml b/.github/workflows/release-nightly.yml similarity index 100% rename from .github/workflows1/release-nightly.yml rename to .github/workflows/release-nightly.yml diff --git a/.github/workflows1/release-tag-rc.yml b/.github/workflows/release-tag-rc.yml similarity index 100% rename from .github/workflows1/release-tag-rc.yml rename to .github/workflows/release-tag-rc.yml diff --git a/.github/workflows1/release-tag-version.yml b/.github/workflows/release-tag-version.yml similarity index 100% rename from .github/workflows1/release-tag-version.yml rename to .github/workflows/release-tag-version.yml From ece48d186c8a3985e86589e3b3bb42e4cbc3c040 Mon Sep 17 00:00:00 2001 From: maias Date: Tue, 27 May 2025 19:15:26 +0300 Subject: [PATCH 85/89] Build and intergration enviroment --- .github/workflows/integration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index e99fd63c72378..825d3cabf8e68 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -7,7 +7,7 @@ on: pull_request: branches: - - feature_branch + -main # Trigger the workflow when a PR is opened to the dev branch ok workflow_dispatch: # Allows manual trigger from the GitHub UI From f9ea5408ca34d6869d86f0e6613b81fd271cfef3 Mon Sep 17 00:00:00 2001 From: maias Date: Tue, 27 May 2025 19:23:42 +0300 Subject: [PATCH 86/89] Build and intergration and pre-production enviroment --- .github/workflows/Pre-Production.yml | 61 +++++++++++++++++++++++++ .github/workflows/integration-tests.yml | 13 ++---- 2 files changed, 65 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/Pre-Production.yml diff --git a/.github/workflows/Pre-Production.yml b/.github/workflows/Pre-Production.yml new file mode 100644 index 0000000000000..bf51378e9ab91 --- /dev/null +++ b/.github/workflows/Pre-Production.yml @@ -0,0 +1,61 @@ +name: Gitea Preproduction Performance Test + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + preprod-performance-test: + runs-on: ubuntu-latest + + services: + postgres: + image: postgres:13 + options: --health-cmd="pg_isready -U gitea_user" --health-timeout=30s --health-retries=3 + ports: + - 5432:5432 + env: + POSTGRES_DB: gitea + POSTGRES_USER: gitea_user + POSTGRES_PASSWORD: gitea_pass + + redis: + image: redis:alpine + ports: + - 6379:6379 + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push Docker image for preprod + run: | + docker build -t maias816/myapp:preprod . + docker push maias816/myapp:preprod + + - name: Start preprod container + run: | + docker run -d -p 8080:8080 --name preprod maias816/myapp:preprod + + - name: Run JMeter performance test + run: | + docker run --rm -v ${{ github.workspace }}/tests:/tests -w /tests justb4/jmeter \ + -n -t performance_test.jmx -l results.jtl -e -o /tests/jmeter-report + + - name: Upload JMeter report + uses: actions/upload-artifact@v3 + with: + name: jmeter-report + path: tests/jmeter-report + + - name: Stop preprod container + run: | + docker stop preprod && docker rm preprod diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 825d3cabf8e68..2c7c10f78d3ca 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,15 +1,10 @@ name: Gitea Setup and Testing on: - # push: - # branches: - # - feature_branch - - pull_request: - branches: - -main - # Trigger the workflow when a PR is opened to the dev branch ok - workflow_dispatch: # Allows manual trigger from the GitHub UI + pull_request: + + + workflow_dispatch: jobs: setup-and-test: From 1f483f181d497400dd7b82615714efde61ecbc0f Mon Sep 17 00:00:00 2001 From: maias Date: Tue, 27 May 2025 19:26:55 +0300 Subject: [PATCH 87/89] Build and intergration and pre-production enviroment --- .github/workflows/Pre-Production.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Pre-Production.yml b/.github/workflows/Pre-Production.yml index bf51378e9ab91..32ab365daa368 100644 --- a/.github/workflows/Pre-Production.yml +++ b/.github/workflows/Pre-Production.yml @@ -51,7 +51,7 @@ jobs: -n -t performance_test.jmx -l results.jtl -e -o /tests/jmeter-report - name: Upload JMeter report - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v2 with: name: jmeter-report path: tests/jmeter-report From 6419b53bffdd6dc417c7e1622e8fbb468d8cc899 Mon Sep 17 00:00:00 2001 From: maias Date: Tue, 27 May 2025 19:30:30 +0300 Subject: [PATCH 88/89] Build and intergration and pre-production enviroment --- .github/workflows/Pre-Production.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Pre-Production.yml b/.github/workflows/Pre-Production.yml index 32ab365daa368..6ee5249a51026 100644 --- a/.github/workflows/Pre-Production.yml +++ b/.github/workflows/Pre-Production.yml @@ -1,4 +1,4 @@ -name: Gitea Preproduction Performance Test +name: Gitea Preproduction Performance Testing on: push: From dfa39b08a0b3c57b94f26d146c80181da204006a Mon Sep 17 00:00:00 2001 From: maias Date: Tue, 27 May 2025 19:34:55 +0300 Subject: [PATCH 89/89] Build and intergration and pre-production enviroment --- .../cron-translations.yml | 0 .github/workflows/Pre-Production.yml | 58 ++++++------------- 2 files changed, 17 insertions(+), 41 deletions(-) rename .github/{workflows => workflow}/cron-translations.yml (100%) diff --git a/.github/workflows/cron-translations.yml b/.github/workflow/cron-translations.yml similarity index 100% rename from .github/workflows/cron-translations.yml rename to .github/workflow/cron-translations.yml diff --git a/.github/workflows/Pre-Production.yml b/.github/workflows/Pre-Production.yml index 6ee5249a51026..32fb398a41663 100644 --- a/.github/workflows/Pre-Production.yml +++ b/.github/workflows/Pre-Production.yml @@ -1,61 +1,37 @@ -name: Gitea Preproduction Performance Testing +name: Pre-Production Performance Testing on: push: branches: - - main - workflow_dispatch: + - main # Runs after PR is merged into main jobs: - preprod-performance-test: + preprod-perf-test: runs-on: ubuntu-latest - services: - postgres: - image: postgres:13 - options: --health-cmd="pg_isready -U gitea_user" --health-timeout=30s --health-retries=3 - ports: - - 5432:5432 - env: - POSTGRES_DB: gitea - POSTGRES_USER: gitea_user - POSTGRES_PASSWORD: gitea_pass - - redis: - image: redis:alpine - ports: - - 6379:6379 - steps: - name: Checkout code uses: actions/checkout@v2 - - name: Log in to Docker Hub - uses: docker/login-action@v2 + - name: Set up Java (required by JMeter) + uses: actions/setup-java@v3 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build and push Docker image for preprod - run: | - docker build -t maias816/myapp:preprod . - docker push maias816/myapp:preprod + distribution: 'temurin' + java-version: '21' - - name: Start preprod container + - name: Install JMeter run: | - docker run -d -p 8080:8080 --name preprod maias816/myapp:preprod + sudo apt update + sudo apt install -y jmeter + jmeter --version - - name: Run JMeter performance test + - name: Run JMeter Test run: | - docker run --rm -v ${{ github.workspace }}/tests:/tests -w /tests justb4/jmeter \ - -n -t performance_test.jmx -l results.jtl -e -o /tests/jmeter-report + mkdir -p reports/jmeter + jmeter -n -t tests/perf_test.jmx -l reports/jmeter/results.jtl -e -o reports/jmeter/report - - name: Upload JMeter report - uses: actions/upload-artifact@v2 + - name: Upload JMeter HTML Report + uses: actions/upload-artifact@bcb6a651d2b8c4fdb17bcf0d2581a3ad16f58aa9 # Pin to known good SHA with: name: jmeter-report - path: tests/jmeter-report - - - name: Stop preprod container - run: | - docker stop preprod && docker rm preprod + path: reports/jmeter/report