-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (53 loc) · 1.29 KB
/
test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Built and Test
on:
pull_request:
paths:
- .github/**
- src/**
- "*.json"
- vite.config.ts
push:
branches:
- main
paths:
- .github/**
- src/**
- "*.json"
- vite.config.ts
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
services:
registry:
image: ghcr.io/project-zot/zot-minimal:v2.1.0
ports:
- 5000:5000
steps:
- name: Wait registry
run: |
for ((i=1; i<=30; i++)); do
status_code=$(curl -o /dev/null -s -w "%{http_code}\n" "http://localhost:5000/v2/" || true)
if [ "$status_code" -eq 200 ]; then
exit 0
fi
sleep 1
done
exit 1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm clean-install
- run: npx biome ci .
- run: npm run test-with-coverage
env:
REGISTRY_DOMAIN: localhost:5000
- run: npm run build
- name: Report Coverage
uses: codacy/[email protected]
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ./coverage/lcov.info