Add more unittest #7
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: unittest-gpu | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
unittest: | |
runs-on: [self-hosted, linux, GPU] | |
environment: Testing | |
steps: | |
- name: Set up unique working directory | |
run: mkdir ${{ runner.temp }}/dj-${{ github.run_id }} | |
shell: bash | |
- uses: actions/checkout@v3 | |
with: | |
path: ${{ runner.temp }}/dj-${{ github.run_id }} | |
- name: Setup docker compose | |
working-directory: .github/workflows/docker | |
run: | | |
docker compose up -d | |
- name: Install data-juicer | |
working-directory: .github/workflows/docker | |
run: | | |
docker compose exec ray-head pip install -e .\[all\] | |
- name: Remove docker compose | |
working-directory: .github/workflows/docker | |
if: always() | |
run: | | |
docker compose down --remove-orphans | |
- name: Cleanup workspace | |
if: always() | |
run: | | |
rm -rf ${{ runner.temp }}/dj-${{ github.run_id }} |