run-tests.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. name: Tests
  2. on: [ push ]
  3. jobs:
  4. run_tests:
  5. runs-on: ubuntu-latest
  6. strategy:
  7. matrix:
  8. python-version: [ 3.7, 3.8, 3.9 ]
  9. attempt: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 ]
  10. fail-fast: false
  11. timeout-minutes: 10
  12. steps:
  13. - uses: actions/checkout@v2
  14. - name: Set up Python
  15. uses: actions/setup-python@v2
  16. with:
  17. python-version: ${{ matrix.python-version }}
  18. - name: Cache dependencies
  19. uses: actions/cache@v2
  20. with:
  21. path: ~/.cache/pip
  22. key: Key-v1-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}
  23. - name: Install dependencies
  24. run: |
  25. python -m pip install --upgrade pip
  26. pip install -r requirements.txt
  27. pip install -r requirements-dev.txt
  28. - name: Build hivemind
  29. run: |
  30. pip install .
  31. - name: Test
  32. run: |
  33. cd tests
  34. pytest test_averaging.py --durations=0 --durations-min=1.0 -v