-
Notifications
You must be signed in to change notification settings - Fork 18
84 lines (68 loc) · 2.1 KB
/
Copy pathbuild-pr.yml
File metadata and controls
84 lines (68 loc) · 2.1 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Build container images (PR)
on:
pull_request:
branches: ["main"]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install Python test dependencies
run: pip install pytest pyyaml pytest-cov
- name: Run Python unit tests
run: pytest tests/ -v --cov=src --cov-report=xml --cov-report=term-missing
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 'lts/*'
cache: 'npm'
cache-dependency-path: webui/package-lock.json
- name: Install WebUI dependencies
working-directory: webui
run: npm ci
- name: Run WebUI tests with coverage
working-directory: webui
run: npm run test:coverage -- --run
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
files: coverage.xml,webui/coverage/lcov.info
flags: python,webui
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
build-images:
runs-on: ubuntu-latest
needs: test
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v6
# Build dapi container (main Dockerfile)
- name: Build dapi image
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf
with:
context: .
push: false
# Build WebUI container
- name: Build WebUI image
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf
with:
context: webui/.
push: false
# Build DevPortal container
- name: Build DevPortal image
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf
with:
context: contrib/devportal/redocly/.
push: false