@@ -1308,9 +1308,92 @@ jobs:
1308
1308
exit 1
1309
1309
fi
1310
1310
1311
+ ui-assets-istanbul-coverage :
1312
+ name : " Assets with Istanbul Plugin for coverage"
1313
+ runs-on : ubuntu-latest
1314
+ strategy :
1315
+ matrix :
1316
+ go-version : [1.19.x]
1317
+ os : [ubuntu-latest]
1318
+ steps :
1319
+ - name : Check out code
1320
+ uses : actions/checkout@v3
1321
+ - name : Read .nvmrc
1322
+ id : node_version
1323
+ run : echo "$(cat .nvmrc)" && echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_ENV
1324
+ - uses : actions/setup-node@v3
1325
+ with :
1326
+ node-version : ${{ env.NVMRC }}
1327
+ cache : " yarn"
1328
+ cache-dependency-path : portal-ui/yarn.lock
1329
+ - uses : actions/cache@v3
1330
+ id : assets-cache-istanbul-coverage
1331
+ name : Assets Cache Istanbul Coverage
1332
+ with :
1333
+ path : |
1334
+ ./portal-ui/build/
1335
+ key : ${{ runner.os }}-assets-istanbul-coverage-${{ github.run_id }}
1336
+ - name : Install Dependencies
1337
+ working-directory : ./portal-ui
1338
+ continue-on-error : false
1339
+ run : |
1340
+ yarn install --frozen-lockfile --immutable
1341
+ - name : Check for Warnings in build output
1342
+ working-directory : ./portal-ui
1343
+ continue-on-error : false
1344
+ run : |
1345
+ ./check-warnings-istanbul-coverage.sh
1346
+ - name : Check if Files are Prettified
1347
+ working-directory : ./portal-ui
1348
+ continue-on-error : false
1349
+ run : |
1350
+ ./check-prettier.sh
1351
+
1352
+ compile-binary-istanbul-coverage :
1353
+ name : " Compile Console Binary with Istanbul Plugin for Coverage"
1354
+ needs :
1355
+ - lint-job
1356
+ - ui-assets-istanbul-coverage
1357
+ - reuse-golang-dependencies
1358
+ - semgrep-static-code-analysis
1359
+ runs-on : ${{ matrix.os }}
1360
+ strategy :
1361
+ matrix :
1362
+ go-version : [1.19.x]
1363
+ os : [ubuntu-latest]
1364
+ steps :
1365
+ - name : Check out code
1366
+ uses : actions/checkout@v3
1367
+
1368
+ - name : Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
1369
+ uses : actions/setup-go@v3
1370
+ with :
1371
+ go-version : ${{ matrix.go-version }}
1372
+ cache : true
1373
+ id : go
1374
+ - uses : actions/cache@v3
1375
+ name : Console Binary Cache Istanbul Coverage
1376
+ with :
1377
+ path : |
1378
+ ./console
1379
+ key : ${{ runner.os }}-binary-istanbul-coverage-${{ github.run_id }}
1380
+ - uses : actions/cache@v3
1381
+ id : assets-cache-istanbul-coverage
1382
+ name : Assets Cache Istanbul Coverage
1383
+ with :
1384
+ path : |
1385
+ ./portal-ui/build/
1386
+ key : ${{ runner.os }}-assets-istanbul-coverage-${{ github.run_id }}
1387
+ - name : Build on ${{ matrix.os }}
1388
+ env :
1389
+ GO111MODULE : on
1390
+ GOOS : linux
1391
+ run : |
1392
+ make console
1393
+
1311
1394
playwright :
1312
1395
needs :
1313
- - compile-binary
1396
+ - compile-binary-istanbul-coverage
1314
1397
timeout-minutes : 60
1315
1398
runs-on : ubuntu-latest
1316
1399
steps :
@@ -1337,21 +1420,16 @@ jobs:
1337
1420
run : npx playwright install --with-deps
1338
1421
1339
1422
- uses : actions/cache@v3
1340
- name : Console Binary Cache
1423
+ name : Console Binary Cache Istanbul Coverage
1341
1424
with :
1342
1425
path : |
1343
1426
./console
1344
- key : ${{ runner.os }}-binary-${{ github.run_id }}
1427
+ key : ${{ runner.os }}-binary-istanbul-coverage- ${{ github.run_id }}
1345
1428
1346
1429
- name : Start Console, front-end app and initialize users/policies
1347
1430
run : |
1348
1431
(./console server) & (make initialize-permissions)
1349
1432
1350
- - name : Start Browser at port 5005
1351
- run : |
1352
- echo "yarn playwright"
1353
- (cd $GITHUB_WORKSPACE/portal-ui; yarn playwright) & (sleep 120) # To start port 5005 with Istanbul Plugin Injected
1354
-
1355
1433
- name : Run Playwright tests
1356
1434
run : |
1357
1435
echo "Run tests under playwright folder only"
0 commit comments