-
Notifications
You must be signed in to change notification settings - Fork 40
42 lines (34 loc) · 1.11 KB
/
docker-build.yml
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
name: Build NV-Ingest Runtime Image
# Trigger for pull requests and pushing to main
on:
pull_request:
types:
- opened
- synchronize
- reopened
push:
branches:
- main
jobs:
build:
runs-on: linux-large-disk
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get current date (yyyy.mm.dd)
run: echo "CURRENT_DATE=$(date +'%Y.%m.%d')" >> $GITHUB_ENV
# Set up Docker Buildx, useful for building multi-platform images
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# Build the Docker image using the Dockerfile
- name: Build Docker image
run: |
docker build --target runtime -t nv-ingest:latest .
- name: Run Pytest inside Docker container
run: |
docker run nv-ingest:latest pytest -rs --cov nv_ingest --cov nv_ingest_client --cov-report term --cov-report xml:coverage.xml tests/nv_ingest tests/nv_ingest_client
- name: Upload test report
uses: actions/upload-artifact@v4
with:
name: pytest-report
path: report.xml