Skip to content

Optimize the workflow and unit test #201

Optimize the workflow and unit test

Optimize the workflow and unit test #201

Workflow file for this run

name: Unit Tests
on:
workflow_dispatch:
pull_request:
branches:
- main
tags:
- r[0-9]+.[0-9]+
paths-ignore:
- 'docs/**'
- '**.md'
push:
branches:
- main
tags:
- r[0-9]+.[0-9]+
paths-ignore:
- 'docs/**'
- '**.md'
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
unit_test:
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Run unit test
run: |
docker pull $UT_IMAGE
docker run -v $PWD:$PWD -w $PWD --net host --ipc host --shm-size 80G -t --rm --gpus all $UT_IMAGE bash -c '
pip install -r requirements/requirements-test.txt && \
git config --global --add safe.directory $PWD && \
pip install -e . && \
make test'
env:
UT_IMAGE: ${{ secrets.UT_IMAGE }}