mirror of
https://github.com/go-gitea/gitea.git
synced 2025-11-06 03:40:32 +01:00
integration env
This commit is contained in:
parent
7d444cebe6
commit
98ef38c352
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -2,7 +2,7 @@ name: Build and Test
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main, dev ]
|
branches: [ dev ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|||||||
54
.github/workflows/load-test.yml
vendored
54
.github/workflows/load-test.yml
vendored
@ -1,32 +1,32 @@
|
|||||||
name: Load Testing with JMeter
|
# name: Load Testing with JMeter
|
||||||
|
|
||||||
on:
|
# on:
|
||||||
push:
|
# push:
|
||||||
branches:
|
# branches:
|
||||||
- main
|
# - main
|
||||||
|
|
||||||
permissions:
|
# permissions:
|
||||||
contents: read
|
# contents: read
|
||||||
actions: read
|
# actions: read
|
||||||
checks: write
|
# checks: write
|
||||||
|
|
||||||
jobs:
|
# jobs:
|
||||||
jmeter:
|
# jmeter:
|
||||||
name: Run JMeter Tests
|
# name: Run JMeter Tests
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
steps:
|
# steps:
|
||||||
- name: Checkout code
|
# - name: Checkout code
|
||||||
uses: actions/checkout@v4
|
# uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Run JMeter Action on a test
|
# - name: Run JMeter Action on a test
|
||||||
uses: rbhadti94/apache-jmeter-action@v0.5.0
|
# uses: rbhadti94/apache-jmeter-action@v0.5.0
|
||||||
with:
|
# with:
|
||||||
testFilePath: tests/jmeter/gite-test-plan.jmx
|
# testFilePath: tests/jmeter/gite-test-plan.jmx
|
||||||
outputReportsFolder: reports/
|
# outputReportsFolder: reports/
|
||||||
args: "--loglevel INFO"
|
# args: "--loglevel INFO"
|
||||||
|
|
||||||
- name: Upload JMeter Test Results
|
# - name: Upload JMeter Test Results
|
||||||
uses: actions/upload-artifact@v4
|
# uses: actions/upload-artifact@v4
|
||||||
with:
|
# with:
|
||||||
name: jmeter-test-results
|
# name: jmeter-test-results
|
||||||
path: reports/
|
# path: reports/
|
||||||
3
.github/workflows/notification-service.yml
vendored
3
.github/workflows/notification-service.yml
vendored
@ -1,9 +1,6 @@
|
|||||||
name: Run Notification Service Tests
|
name: Run Notification Service Tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|||||||
122
.github/workflows/preproduction.yml
vendored
Normal file
122
.github/workflows/preproduction.yml
vendored
Normal 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/
|
||||||
3
.github/workflows/test-runner.yaml
vendored
3
.github/workflows/test-runner.yaml
vendored
@ -1,9 +1,6 @@
|
|||||||
name: Run API & Selenium Tests Separately
|
name: Run API & Selenium Tests Separately
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user