Skip to content

Commit

Permalink
Add docker to workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
seneyu committed Nov 16, 2024
1 parent 54178e0 commit a6a9f77
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions .github/workflows/mlflow-js.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,42 @@ on:
paths:
- '.github/workflows/**'
- 'mlflow/**'

jobs:
build:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '22.7'
- name: Install

- name: Install dependencies
working-directory: ./mlflow
run: npm ci

- name: Eslint
working-directory: ./mlflow
run: npm run lint

- name: Build
working-directory: ./mlflow
run: npm run build

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Run MLflow server
run: |
docker run -d -p 5001:5002 --name mlflow-container ghcr.io/mlflow/mlflow:latest mlflow server --host 0.0.0.0 --port 5002
sleep 10
- name: Run tests
working-directory: ./mlflow
run: npm run test

- name: Stop MLflow server
run: docker stop mlflow-container

0 comments on commit a6a9f77

Please sign in to comment.