mirror of
https://github.com/go-gitea/gitea.git
synced 2025-10-01 01:38:47 +02:00
performance
This commit is contained in:
parent
bc5624f52c
commit
e509ce4949
49
.github/workflows/build.yml
vendored
49
.github/workflows/build.yml
vendored
@ -5,30 +5,39 @@ on:
|
|||||||
branches: [ dev ]
|
branches: [ dev ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lighthouse-tests:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install Lighthouse CLI
|
- name: Set up Go environment
|
||||||
run: npm install -g lighthouse
|
uses: actions/setup-go@v3
|
||||||
|
with:
|
||||||
|
go-version: '1.23.4'
|
||||||
|
|
||||||
- name: Run Lighthouse Performance Audit
|
- name: Install dependencies
|
||||||
run: |
|
run: go mod download
|
||||||
mkdir -p reports
|
|
||||||
lighthouse https://fox-one-promptly.ngrok-free.app \
|
|
||||||
--output=json \
|
|
||||||
--output=html \
|
|
||||||
--output-path=reports/lighthouse.html \
|
|
||||||
--chrome-flags="--headless"
|
|
||||||
|
|
||||||
- name: Debug - List Files
|
- name: Run unit tests
|
||||||
run: ls -alh reports
|
run: go test ./... -v
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Upload Lighthouse Report
|
- name: Run linting
|
||||||
uses: actions/upload-artifact@v4
|
run: |
|
||||||
with:
|
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
|
||||||
name: lighthouse-report
|
golangci-lint run
|
||||||
path: reports/lighthouse.report.html
|
|
||||||
|
|
||||||
|
- name: Build Docker image
|
||||||
|
run: |
|
||||||
|
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/gitea:latest .
|
||||||
|
|
||||||
|
- name: Log in to DockerHub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Push Docker image
|
||||||
|
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/gitea:latest
|
||||||
|
9
.github/workflows/preproduction.yml
vendored
9
.github/workflows/preproduction.yml
vendored
@ -123,7 +123,7 @@ jobs:
|
|||||||
|
|
||||||
lighthouse-tests:
|
lighthouse-tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [api-tests, selenium-tests, notification-service-tests]
|
needs: [api-tests, selenium-tests, notification-service-tests]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -133,20 +133,21 @@ jobs:
|
|||||||
|
|
||||||
- name: Run Lighthouse Performance Audit
|
- name: Run Lighthouse Performance Audit
|
||||||
run: |
|
run: |
|
||||||
|
mkdir -p reports
|
||||||
lighthouse https://fox-one-promptly.ngrok-free.app \
|
lighthouse https://fox-one-promptly.ngrok-free.app \
|
||||||
--output=json \
|
--output=json \
|
||||||
--output=html \
|
--output=html \
|
||||||
--output-path=./lighthouse.html \
|
--output-path=reports/lighthouse.html \
|
||||||
--chrome-flags="--headless"
|
--chrome-flags="--headless"
|
||||||
|
|
||||||
- name: Debug - List Files
|
- name: Debug - List Files
|
||||||
run: ls -alh
|
run: ls -alh reports
|
||||||
|
|
||||||
- name: Upload Lighthouse Report
|
- name: Upload Lighthouse Report
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: lighthouse-report
|
name: lighthouse-report
|
||||||
path: lighthouse-report.html
|
path: reports/lighthouse.report.html
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user