0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-11-01 04:58:52 +01:00

integration env

This commit is contained in:
moslem-asaad 2025-03-05 11:42:26 +02:00
parent 7d444cebe6
commit 98ef38c352
5 changed files with 150 additions and 34 deletions

View File

@ -2,7 +2,7 @@ name: Build and Test
on:
push:
branches: [ main, dev ]
branches: [ dev ]
jobs:
build:

View File

@ -1,32 +1,32 @@
name: Load Testing with JMeter
# name: Load Testing with JMeter
on:
push:
branches:
- main
# on:
# push:
# branches:
# - main
permissions:
contents: read
actions: read
checks: write
# permissions:
# contents: read
# actions: read
# checks: write
jobs:
jmeter:
name: Run JMeter Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
# jobs:
# jmeter:
# name: Run JMeter Tests
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
- name: Run JMeter Action on a test
uses: rbhadti94/apache-jmeter-action@v0.5.0
with:
testFilePath: tests/jmeter/gite-test-plan.jmx
outputReportsFolder: reports/
args: "--loglevel INFO"
# - name: Run JMeter Action on a test
# uses: rbhadti94/apache-jmeter-action@v0.5.0
# with:
# testFilePath: tests/jmeter/gite-test-plan.jmx
# outputReportsFolder: reports/
# args: "--loglevel INFO"
- name: Upload JMeter Test Results
uses: actions/upload-artifact@v4
with:
name: jmeter-test-results
path: reports/
# - name: Upload JMeter Test Results
# uses: actions/upload-artifact@v4
# with:
# name: jmeter-test-results
# path: reports/

View File

@ -1,9 +1,6 @@
name: Run Notification Service Tests
on:
push:
branches:
- main
pull_request:
branches:
- main

122
.github/workflows/preproduction.yml vendored Normal file
View File

@ -0,0 +1,122 @@
name: Pre Production tests
on:
push:
branches:
- main
permissions:
contents: read
actions: read
checks: write
jobs:
api-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Install Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Pull Latest Test Image
run: docker pull moslemasaad/gitea-test-automation
- name: Run API Tests
run: |
cd Gitea-Test-Automation
docker-compose up --exit-code-from api-test-runner api-test-runner
- name: Stop API Containers
run: |
cd Gitea-Test-Automation
docker-compose down
selenium-tests:
runs-on: ubuntu-latest
needs: api-tests
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Install Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Pull Latest Test Image
run: docker pull moslemasaad/gitea-test-automation
- name: Start Selenium Grid & Run Selenium Tests
run: |
cd Gitea-Test-Automation
docker-compose up --exit-code-from selenium-test-runner selenium-hub chrome-node firefox-node selenium-test-runner
- name: Stop Selenium Containers
run: |
cd Gitea-Test-Automation
docker-compose down
notification-service-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Pull Latest notification service Image
run: docker pull moslemasaad/gitea-notificator
- name: Run Tests
run: docker run --rm moslemasaad/gitea-notificator test
jmeter:
name: Run JMeter Tests
needs: [api-tests, selenium-tests, notification-service-tests]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run JMeter Action on a test
uses: rbhadti94/apache-jmeter-action@v0.5.0
with:
testFilePath: tests/jmeter/gite-test-plan.jmx
outputReportsFolder: reports/
args: "--loglevel INFO"
- name: Upload JMeter Test Results
uses: actions/upload-artifact@v4
with:
name: jmeter-test-results
path: reports/

View File

@ -1,9 +1,6 @@
name: Run API & Selenium Tests Separately
on:
push:
branches:
- main
pull_request:
branches:
- main