-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (36 loc) · 1.42 KB
/
on-pr.yaml
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: RunAI Model Streamer Library - Pull Request
on:
pull_request:
jobs:
lifecycle-install-tests:
name: Test, Build & Push
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set PACKAGE_VERSION
run: echo "PACKAGE_VERSION=0.0.0+dev.$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Run tests and build
uses: devcontainers/[email protected]
with:
runCmd: |
make test && \
PACKAGE_VERSION=${{ env.PACKAGE_VERSION }} make build
- name: Set package file names
run: |
file=$(find py/runai_model_streamer/dist -maxdepth 1 -type f -name 'runai_model_streamer*.whl' -print -quit)
s3_file=$(find py/runai_model_streamer_s3/dist -maxdepth 1 -type f -name 'runai_model_streamer_s3-*.whl' -print -quit)
echo "PACKAGE_FILE=$(basename $file)" >> $GITHUB_ENV
echo "S3_PACKAGE_FILE=$(basename $s3_file)" >> $GITHUB_ENV
- name: Upload streamer package to github action
uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGE_FILE }}
path: py/runai_model_streamer/dist/${{ env.PACKAGE_FILE }}
if-no-files-found: error
- name: Upload s3 streamer package to github action
uses: actions/upload-artifact@v4
with:
name: ${{ env.S3_PACKAGE_FILE }}
path: py/runai_model_streamer_s3/dist/${{ env.S3_PACKAGE_FILE }}
if-no-files-found: error