File tree Expand file tree Collapse file tree 2 files changed +38
-28
lines changed Expand file tree Collapse file tree 2 files changed +38
-28
lines changed Original file line number Diff line number Diff line change 55    branches : [ dev ] 
66
77jobs :
8-   lighthouse-tests :
8+   build :
99    runs-on : ubuntu-latest 
10+ 
1011    steps :
11-       - name : Checkout Code 
12-         uses : actions/checkout@v4 
13- 
14-       - name : Install Lighthouse CLI 
15-         run : npm install -g lighthouse 
16- 
17-       - name : Run Lighthouse Performance Audit 
18-         run : | 
19-           mkdir -p reports 
20-           lighthouse https://fox-one-promptly.ngrok-free.app \ 
21-             --output=json \ 
22-             --output=html \ 
23-             --output-path=reports/lighthouse.html \ 
24-             --chrome-flags="--headless" 
25- 
26-        - name : Debug - List Files 
27-         run : ls -alh reports 
28- 
29-       - name : Upload Lighthouse Report 
30-         uses : actions/upload-artifact@v4 
31-         with :
32-           name : lighthouse-report 
33-           path : reports/lighthouse.report.html 
12+     - name : Checkout code 
13+       uses : actions/checkout@v3 
14+ 
15+     - name : Set up Go environment 
16+       uses : actions/setup-go@v3 
17+       with :
18+         go-version : ' 1.23.4' 
19+ 
20+     - name : Install dependencies 
21+       run : go mod download 
22+ 
23+     - name : Run unit tests 
24+       run : go test ./... -v 
25+       continue-on-error : true 
26+ 
27+     - name : Run linting 
28+       run : | 
29+         go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest 
30+         golangci-lint run 
31+ 
32+      - name : Build Docker image 
33+       run : | 
34+         docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/gitea:latest . 
35+ 
36+      - name : Log in to DockerHub 
37+       uses : docker/login-action@v2 
38+       with :
39+         username : ${{ secrets.DOCKERHUB_USERNAME }} 
40+         password : ${{ secrets.DOCKERHUB_TOKEN }} 
3441
42+     - name : Push Docker image 
43+       run : docker push ${{ secrets.DOCKERHUB_USERNAME }}/gitea:latest 
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ jobs:
123123
124124  lighthouse-tests :
125125    runs-on : ubuntu-latest 
126-     needs : [api-tests, selenium-tests, notification-service-tests]   
126+     needs : [api-tests, selenium-tests, notification-service-tests] 
127127    steps :
128128      - name : Checkout Code 
129129        uses : actions/checkout@v4 
@@ -133,20 +133,21 @@ jobs:
133133
134134      - name : Run Lighthouse Performance Audit 
135135        run : | 
136+           mkdir -p reports 
136137          lighthouse https://fox-one-promptly.ngrok-free.app \ 
137138            --output=json \ 
138139            --output=html \ 
139-             --output-path=. /lighthouse.html \ 
140+             --output-path=reports /lighthouse.html \ 
140141            --chrome-flags="--headless" 
141142
142143       - name : Debug - List Files 
143-         run : ls -alh 
144+         run : ls -alh reports  
144145
145146      - name : Upload Lighthouse Report 
146147        uses : actions/upload-artifact@v4 
147148        with :
148149          name : lighthouse-report 
149-           path : lighthouse- report.html 
150+           path : reports/ lighthouse. report.html
150151
151152
152153
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments