/
niceSOFT
/
python3-build
Обзор
Документация
Войти
/
niceSOFT
/
python3-build
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
0.4.0
.github/workflows/test.yml
122 строки
3 KB
Filipe Laíns
ci: fix Python instalation order
19 май 2021, 00:04
19 май 2021, 00:04
c72a4fc
Код
Авторство
О чём код?
name: test on: push: branches: - main paths-ignore: - 'docs/**' - '*.md' pull_request: branches: - main paths-ignore: - 'docs/**' - '*.md' schedule: - cron: "0 8 * * *" jobs: pytest: runs-on: ${{ matrix.os }}-latest env: PYTEST_ADDOPTS: "--run-integration --showlocals -vv --durations=10" strategy: fail-fast: false matrix: os: - ubuntu - macos - windows py: - '3.10-dev' - '3.9' - '3.8' - '3.7' - '3.6' - '3.5' - '2.7' - 'pypy3' - 'pypy2' steps: - uses: actions/checkout@v2 - name: Setup python for test ${{ matrix.py }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.py }} - name: Pick environment to run run: | import platform; import os; import sys; import codecs cpy = platform.python_implementation() == "CPython" base =("{}{}{}" if cpy else "{}{}").format("py" if cpy else "pypy", *sys.version_info[0:2]) env = "BASE={}\n".format(base) print("Picked:\n{}for{}".format(env, sys.version)) with codecs.open(os.environ["GITHUB_ENV"], "a", "utf-8") as file_handler: file_handler.write(env) shell: python - name: Setup python for tox uses: actions/setup-python@v2 with: python-version: 3.9 - name: Install tox run: python -m pip install tox - name: Setup test suite run: tox -vv --notest -e ${{env.BASE}},${{env.BASE}}-path,${{env.BASE}}-sdist,${{env.BASE}}-wheel - name: Run test suite via tox run: tox -e ${{env.BASE}} --skip-pkg-install - name: Run test suite via path run: tox -e ${{env.BASE}}-path --skip-pkg-install - name: Run test suite via sdist run: tox -e ${{env.BASE}}-sdist --skip-pkg-install - name: Run test suite via wheel run: tox -e ${{env.BASE}}-wheel --skip-pkg-install - name: Run minimum version test run: tox -e ${{env.BASE}}-min - name: Rename coverage report file run: | import os; os.rename('.tox/coverage.{}.xml'.format(os.environ['BASE']), '.tox/coverage.xml') shell: python - uses: codecov/codecov-action@v1 if: ${{ always() }} env: PYTHON: ${{ matrix.python }} with: file: ./.tox/coverage.xml flags: tests env_vars: PYTHON name: ${{ matrix.py }} - ${{ matrix.os }} type: runs-on: ubuntu-latest env: PY_COLORS: 1 TOX_PARALLEL_NO_SPINNER: 1 steps: - uses: actions/checkout@v2 - name: Setup Python 3.9 uses: actions/setup-python@v2 with: python-version: 3.9 - name: Install tox run: python -m pip install tox - name: Setup run environment run: tox -vv --notest -e type - name: Run check for type run: tox -e type --skip-pkg-install