Optimize the accuracy benchmark workflow #240
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |