Skip to content

Commit

Permalink
Clean up the CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tmke8 committed Oct 17, 2023
1 parent 0f7410f commit bed2285
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 79 deletions.
30 changes: 7 additions & 23 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ jobs:
poetry install --only lint --no-interaction --no-root
- name: Lint with ruff
run: |
poetry run ruff check --format=github ethicml
poetry run ruff check --output-format=github ethicml
- name: Lint with ruff
run: |
poetry run ruff check --format=github tests
poetry run ruff check --output-format=github tests
format_with_black:

Expand All @@ -58,32 +58,16 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11' # might as well use 3.11 as it's faster
- name: Install black
run: |
poetry env use 3.10
poetry env use 3.11
poetry install --only format --no-interaction --no-root
- name: Format with black
run: |
poetry run black --check -l 100 -t py310 -S ethicml/
poetry run black --check -l 100 -t py310 -S tests/
check_docstrings:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
pip install -r docs/requirements.txt
check_with_darglint:

runs-on: ubuntu-latest
Expand All @@ -92,7 +76,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11' # might as well use 3.11 as it's faster
- name: Install darglint
run: |
python -m pip install --upgrade pip
Expand All @@ -118,7 +102,7 @@ jobs:
run: |
poetry run python -c "import ethicml"
test_full_dependencies:
test_build_docs:
runs-on: ubuntu-latest

steps:
Expand All @@ -144,7 +128,7 @@ jobs:
poetry run sphinx-build -W -b html ./docs ./docs/_build
test_with_pytest:
needs: [lint_with_ruff, format_with_black, check_docstrings, check_with_darglint, test_minimal_dependencies, test_full_dependencies]
needs: [lint_with_ruff, format_with_black, check_docstrings, check_with_darglint, test_minimal_dependencies, test_build_docs]
runs-on: ubuntu-latest

steps:
Expand Down
43 changes: 17 additions & 26 deletions .github/workflows/dummy_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,6 @@ jobs:
run: |
echo "pass!"
check_docstrings:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'poetry'
- name: Install dependencies
run: |
poetry env use 3.10
poetry install --no-interaction --no-root --all-extras --with docs,torchcpu --without ci,lint,format
- name: Install pandoc
run: sudo apt-get install -y pandoc
- name: Build with sphinx
run: |
poetry run sphinx-build -W -b html ./docs ./docs/_build
check_with_darglint:

runs-on: ubuntu-latest
Expand All @@ -80,14 +57,28 @@ jobs:
run: |
echo "pass!"
test_full_dependencies:
test_build_docs:

runs-on: ubuntu-latest

steps:
- name: Check with darglint
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'poetry'
- name: Install dependencies
run: |
echo "pass!"
poetry env use 3.10
poetry install --no-interaction --no-root --all-extras --with docs,torchcpu --without ci,lint,format
- name: Install pandoc
run: sudo apt-get install -y pandoc
- name: Build with sphinx
run: |
poetry run sphinx-build -W -b html ./docs ./docs/_build
test_with_pytest:

Expand Down
7 changes: 0 additions & 7 deletions docs/requirements.txt

This file was deleted.

41 changes: 18 additions & 23 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bed2285

Please sign in to comment.