Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Aug 15, 2024
1 parent 2bf28c2 commit 54e6c30
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 10 deletions.
33 changes: 23 additions & 10 deletions .github/workflows/cpu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@ defaults:
shell: bash

jobs:
cpu-tests:
pytester:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- {os: "macOS-13", python-version: "3.10"}
- {os: "ubuntu-22.04", python-version: "3.10"}
- {os: "windows-2022", python-version: "3.10"}
os: ["ubuntu-22.04", "macos-13", "windows-2022"]
python-version: ["3.10"]
pkg-install: ["no", "yes"]
timeout-minutes: 15

steps:
Expand All @@ -38,15 +37,29 @@ jobs:
pyproject.toml
setup.py
- name: Run tests without the package installed
- name: Install package & dependencies
run: |
pip install ".[all]" pytest
pip list
pytest --disable-pytest-warnings --strict-markers --color=yes
- name: Drop package itself
if: matrix.pkg-install == 'no'
run: pip uninstall -y lit-llama

- name: Run tests
run: |
pip install . --no-deps
run: pytest -v --durations=10


pytest -v --durations=10 --disable-pytest-warnings --strict-markers --color=yes
testing-guardian:
runs-on: ubuntu-latest
needs: pytester
if: always()
steps:
- run: echo "${{ needs.pytester.result }}"
- name: failing...
if: needs.pytester.result == 'failure'
run: exit 1
- name: cancelled or skipped...
if: contains(fromJSON('["cancelled", "skipped"]'), needs.pytester.result)
timeout-minutes: 1
run: sleep 90
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,11 @@ where = ["."] # list of folders that contain the packages (["."] by default)
include = ["lit_llama"] # package names should match these glob patterns (["*"] by default)
exclude = [] # exclude packages matching these glob patterns (empty by default)
namespaces = false # to disable scanning PEP 420 namespaces (true by default)


[tool.pytest.ini_options]
addopts = [
"--strict-markers",
"--color=yes",
"--disable-pytest-warnings",
]

0 comments on commit 54e6c30

Please sign in to comment.