-
Notifications
You must be signed in to change notification settings - Fork 17
41 lines (35 loc) · 1 KB
/
unit_test.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
name: Unit Tests
on:
workflow_dispatch:
pull_request:
branches:
- main
- dev
paths-ignore:
- 'docs/**'
push:
branches:
- main
paths-ignore:
- 'docs/**'
tags:
- v[0-9]+.[0-9]+.[0-9]+
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
run-shell-script:
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run unit test
run: |
containers=$(docker ps -aqf "name=^chatlearn_ut_")
if [[ -n "$containers" ]]; then
docker rm $containers -f
fi
docker pull $UT_IMAGE
docker run -v $PWD:$PWD -w $PWD --name chatlearn_ut_$(date '+%d_%m_%Y_%H_%M_%S') --net host --ipc host --shm-size 80G -t --rm --gpus all $UT_IMAGE bash -c 'make test'
env:
UT_IMAGE: registry.cn-wulanchabu.aliyuncs.com/pai-dlc/pytorch-training:2.4.0-gpu-py3.10-cu12.5-ngc24.06-ubuntu22.04