mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-25 20:06:50 +02:00
ligh house
This commit is contained in:
parent
d3b4329a60
commit
fc967a590f
51
.github/workflows/build.yml
vendored
51
.github/workflows/build.yml
vendored
@ -5,39 +5,30 @@ on:
|
||||
branches: [ dev ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
lighthouse-tests:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
needs: [api-tests, selenium-tests, notification-service-tests]
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go environment
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '1.23.4'
|
||||
- name: Install Lighthouse CLI
|
||||
run: npm install -g lighthouse
|
||||
|
||||
- name: Install dependencies
|
||||
run: go mod download
|
||||
- name: Run Lighthouse Performance Audit
|
||||
run: |
|
||||
mkdir -p reports
|
||||
lighthouse https://fox-one-promptly.ngrok-free.app \
|
||||
--output=json \
|
||||
--output=html \
|
||||
--output-path=reports/lighthouse.html \
|
||||
--chrome-flags="--headless"
|
||||
|
||||
- name: Run unit tests
|
||||
run: go test ./... -v
|
||||
continue-on-error: true
|
||||
- name: Debug - List Files
|
||||
run: ls -alh reports
|
||||
|
||||
- name: Run linting
|
||||
run: |
|
||||
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
|
||||
golangci-lint run
|
||||
|
||||
- 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
|
||||
- name: Upload Lighthouse Report
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: lighthouse-report
|
||||
path: reports/lighthouse.html
|
||||
|
Loading…
x
Reference in New Issue
Block a user