Skip to content

Commit

Permalink
Improve CI and nightly workflows (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
durandtibo committed May 12, 2023
1 parent da14f91 commit b5740ca
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,47 @@ jobs:
# in the github UI just because the coverage report failed to
# be published.
fail_ci_if_error: false

test-minimal:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
max-parallel: 8
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest ]
python-version: [ '3.9', '3.10', '3.11' ]

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Install packages
run: |
poetry run make config-poetry
poetry run make install-min
- name: Show installed packages
run: |
poetry run poetry show
poetry run poetry show --tree
- name: Format
run: |
poetry run make format
- name: Lint
run: |
poetry run make lint
- name: Run unit tests
run: |
poetry run make unit-test-cov
44 changes: 44 additions & 0 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,50 @@ jobs:
run: |
poetry run make unit-test
test-minimal:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
max-parallel: 8
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest ]
python-version: [ '3.9', '3.10', '3.11' ]

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Install packages
run: |
poetry run make config-poetry
poetry run make install-min
- name: Show installed packages
run: |
poetry run poetry show
poetry run poetry show --tree
- name: Format
run: |
poetry run make format
- name: Lint
run: |
poetry run make lint
- name: Run unit tests
run: |
poetry run make unit-test-cov
package:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ config-poetry :
poetry config experimental.system-git-client true
poetry config --list

.PHONY : install-min
install-min :
poetry install --no-interaction
pip install --upgrade torch>=2.0.1 # TODO: https://github.com/pytorch/pytorch/issues/100974

.PHONY : install
install :
poetry install --no-interaction --all-extras
Expand Down

0 comments on commit b5740ca

Please sign in to comment.