33on :
44 push :
55 branches :
6- - " main"
6+ - ' main'
77 tags :
8- - " v* "
8+ - ' v* '
99 pull_request :
1010 branches :
1111 - ' main'
@@ -77,19 +77,46 @@ jobs:
7777 cache-from : type=gha
7878 cache-to : type=gha,mode=max
7979
80- test :
80+ lint :
8181 runs-on : ubuntu-latest
82- needs : [ runtime ]
83- container :
84- image : ghcr.io/import-ai/omnibox-backend-runtime:latest
85- credentials :
86- username : ${{ github.actor }}
87- password : ${{ secrets.GITHUB_TOKEN }}
82+ steps :
83+ - name : Checkout
84+ uses : actions/checkout@v4
8885
86+ - name : Setup pnpm
87+ uses : pnpm/action-setup@v4
88+ with :
89+ version : 10.17.1
90+
91+ - name : Setup Node.js
92+ uses : actions/setup-node@v4
93+ with :
94+ node-version : ' 20'
95+ cache : ' pnpm'
96+
97+ - name : Install dependencies
98+ run : pnpm install --frozen-lockfile
99+
100+ - name : Run lint
101+ run : pnpm lint
102+
103+ test :
104+ runs-on : ubuntu-latest
89105 steps :
90106 - name : Checkout
91107 uses : actions/checkout@v4
92108
109+ - name : Setup pnpm
110+ uses : pnpm/action-setup@v4
111+ with :
112+ version : 10.17.1
113+
114+ - name : Setup Node.js
115+ uses : actions/setup-node@v4
116+ with :
117+ node-version : ' 20'
118+ cache : ' pnpm'
119+
93120 - name : Install dependencies
94121 run : pnpm install --frozen-lockfile
95122
@@ -108,9 +135,7 @@ jobs:
108135 - name : Run tests
109136 run : pnpm test:e2e --coverage
110137 env :
111- OBB_POSTGRES_URL : postgres://omnibox:omnibox@postgres:5432/omnibox
112- OBB_MINIO_URL : http://username:password@minio:9000/omnibox
113- OBB_LOG_LEVELS : " "
138+ OBB_LOG_LEVELS : ' '
114139
115140 - name : Print coverage report
116141 run : |
@@ -125,7 +150,7 @@ jobs:
125150
126151 app :
127152 runs-on : ubuntu-latest
128- needs : [ test ]
153+ needs : [runtime, test, lint ]
129154 steps :
130155 - name : Checkout
131156 uses : actions/checkout@v4
@@ -172,7 +197,7 @@ jobs:
172197
173198 webhook :
174199 runs-on : ubuntu-latest
175- needs : [ app ]
200+ needs : [app]
176201 steps :
177202 - name : TEST push webhook
178203 if : github.event_name == 'push'
0 commit comments