Skip to content

Commit

Permalink
Workflows will be the death of me
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgroot42 committed Jan 12, 2024
1 parent 10238ea commit b9c7597
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 35 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/setup_env.yml

This file was deleted.

20 changes: 15 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit b9c7597

Please sign in to comment.