Skip to content

Commit 8719cde

Browse files
authored
Merge pull request #77 from oslabs-beta/stephany/github-actions-3
Add MLflow server, Lint, Jest testing to github actions workflow
2 parents d7f9fed + cf9231b commit 8719cde

File tree

1 file changed

+30
-5
lines changed

1 file changed

+30
-5
lines changed

.github/workflows/mlflow-js.yaml

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,44 @@
11
name: mlflow
22
on:
3-
push:
4-
branches: [stephany/github-actions-3]
3+
pull_request:
4+
branches:
5+
- main
6+
57
jobs:
6-
build:
8+
build-and-test:
79
runs-on: ubuntu-latest
810
steps:
9-
- uses: actions/checkout@v4
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
1014
- name: Use Node.js
1115
uses: actions/setup-node@v4
1216
with:
1317
node-version: '22.7'
14-
- name: Install and build
18+
19+
- name: Install dependencies
1520
working-directory: ./mlflow
1621
run: npm ci
22+
23+
- name: Eslint
24+
working-directory: ./mlflow
25+
run: npm run lint
26+
27+
- name: Set up Docker Buildx
28+
uses: docker/setup-buildx-action@v3
29+
30+
- name: Run MLflow server
31+
run: |
32+
docker run -d -p 5002:5002 --name mlflow-container ghcr.io/mlflow/mlflow:latest mlflow server --host 0.0.0.0 --port 5002
33+
sleep 30
34+
35+
- name: Run tests
36+
working-directory: ./mlflow
37+
run: npm run test
38+
39+
- name: Stop MLflow server
40+
run: docker stop mlflow-container
41+
1742
- name: Build
1843
working-directory: ./mlflow
1944
run: npm run build

0 commit comments

Comments
 (0)