You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.5 KiB

  1. name: ubuntu_tests
  2. on: [pull_request, push]
  3. jobs:
  4. ubuntu_tests:
  5. strategy:
  6. fail-fast: false
  7. matrix:
  8. python-version:
  9. - 2.7.18
  10. - 3.5.10
  11. - 3.6.15
  12. - 3.7.10
  13. - 3.8.10
  14. - 3.9.5
  15. - 3.10.0
  16. runs-on: Ubuntu-20.04
  17. steps:
  18. - uses: actions/checkout@v2
  19. # Normally, we would use the superbly maintained...
  20. # - uses: actions/setup-python@v2
  21. # with:
  22. # python-version: ${{ matrix.python-version }}
  23. # ... but in the repo, we want to test pyenv builds on Ubuntu
  24. - run: |
  25. sudo apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev \
  26. libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
  27. xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
  28. # https://github.com/pyenv/pyenv#installation
  29. - run: pwd
  30. - env:
  31. PYENV_ROOT: /home/runner/work/pyenv/pyenv
  32. run: |
  33. echo $PYENV_ROOT
  34. echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH
  35. bin/pyenv install ${{ matrix.python-version }}
  36. bin/pyenv global ${{ matrix.python-version }}
  37. bin/pyenv rehash
  38. - run: python --version
  39. - run: python -m pip --version
  40. - shell: python # Prove that actual Python == expected Python
  41. env:
  42. EXPECTED_PYTHON: ${{ matrix.python-version }}
  43. run: import os, sys ; assert sys.version.startswith(os.getenv("EXPECTED_PYTHON"))