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