From cd4955367e4170b88ba839efccb6d2ed0dd963ad Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Mon, 9 Sep 2024 17:32:55 +0900 Subject: [PATCH] Add back CI action for tests-ui (#4859) --- .github/workflows/test-unit.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/test-unit.yml diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml new file mode 100644 index 00000000..a988c8a8 --- /dev/null +++ b/.github/workflows/test-unit.yml @@ -0,0 +1,25 @@ +name: Unit Tests + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + - name: Install requirements + run: | + python -m pip install --upgrade pip + pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu + pip install -r requirements.txt + - name: Run Unit Tests + run: | + pip install -r tests-unit/requirements.txt + python -m pytest tests-unit