diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index dced92a..753cfbc 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -6,14 +6,27 @@ on: - main # or your default branch jobs: - setup-environment: - uses: ./.github/workflows/setup_env.yml - build-documentation: runs-on: ubuntu-latest - needs: setup-environment steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.9' # Specify your Python version + + - name: Install pdoc + run: pip install pdoc3 # Install pdoc or pdoc3 + + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu + if [ -f requirements_workflow.txt ]; then pip install -r requirements_workflow.txt; fi + - name: Generate Documentation run: | rm -r docs/ diff --git a/.github/workflows/setup_env.yml b/.github/workflows/setup_env.yml deleted file mode 100644 index 5b35503..0000000 --- a/.github/workflows/setup_env.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Setup environment - -on: - workflow_call: - -jobs: - env_setup: - runs-on: ubuntu-latest - - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: '3.9' # Specify your Python version - - - name: Install pdoc - run: pip install pdoc3 # Install pdoc or pdoc3 - - - name: Install Dependencies - run: | - python -m pip install --upgrade pip - pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu - if [ -f requirements_workflow.txt ]; then pip install -r requirements_workflow.txt; fi diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3b186b9..bf6eca5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,13 +3,23 @@ name: Tests on: [push, pull_request] jobs: - setup-environment: - uses: ./.github/workflows/setup_env.yml - test: runs-on: ubuntu-latest - needs: setup-environment steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.9' # Specify your Python version + + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu + if [ -f requirements_workflow.txt ]; then pip install -r requirements_workflow.txt; fi + - name: Run tests - run: pytest + run: python -m pytest