Skip to content

Commit a6a9f77

Browse files
committed
Add docker to workflows
1 parent 54178e0 commit a6a9f77

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

.github/workflows/mlflow-js.yaml

+24-3
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,42 @@ on:
44
paths:
55
- '.github/workflows/**'
66
- 'mlflow/**'
7+
78
jobs:
8-
build:
9+
build-and-test:
910
runs-on: ubuntu-latest
1011
steps:
11-
- uses: actions/checkout@v4
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
1215
- name: Use Node.js
1316
uses: actions/setup-node@v4
1417
with:
1518
node-version: '22.7'
16-
- name: Install
19+
20+
- name: Install dependencies
1721
working-directory: ./mlflow
1822
run: npm ci
23+
1924
- name: Eslint
2025
working-directory: ./mlflow
2126
run: npm run lint
27+
2228
- name: Build
2329
working-directory: ./mlflow
2430
run: npm run build
31+
32+
- name: Set up Docker Buildx
33+
uses: docker/setup-buildx-action@v3
34+
35+
- name: Run MLflow server
36+
run: |
37+
docker run -d -p 5001:5002 --name mlflow-container ghcr.io/mlflow/mlflow:latest mlflow server --host 0.0.0.0 --port 5002
38+
sleep 10
39+
40+
- name: Run tests
41+
working-directory: ./mlflow
42+
run: npm run test
43+
44+
- name: Stop MLflow server
45+
run: docker stop mlflow-container

0 commit comments

Comments
 (0)