Skip to content

SCALRCORE-33689: Remove Deprecated set-output From Workflows #1

SCALRCORE-33689: Remove Deprecated set-output From Workflows

SCALRCORE-33689: Remove Deprecated set-output From Workflows #1

Workflow file for this run

name: CI
on: [push, pull_request]
permissions: "read-all"
defaults:
run:
shell: bash
jobs:
package:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: "Checkout repository"
uses: "actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b"
- name: "Setup Python"
uses: "actions/setup-python@5ccb29d8773c3f3f653e1705f474dfaa8a06a912"
with:
python-version: "3.x"
cache: "pip"
- name: "Check packages"
run: |
python -m pip install -U pip setuptools wheel build twine rstcheck
python -m build
rstcheck CHANGES.rst
python -m twine check dist/*
test:
env:
SETUPTOOLS_USE_DISTUTILS: stdlib
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
os:
- macos-11
- windows-latest
- ubuntu-20.04 # OpenSSL 1.1.1
- ubuntu-22.04 # OpenSSL 3.0
experimental: [false]
nox-session: ['']
include:
- python-version: "pypy-3.7"
os: ubuntu-latest
experimental: false
nox-session: test-pypy
- python-version: "pypy-3.8"
os: ubuntu-latest
experimental: false
nox-session: test-pypy
- python-version: "2.7"
os: ubuntu-20.04 # CPython 2.7 is not available for ubuntu-22.04
experimental: false
nox-session: unsupported_setup_py
- python-version: "3.x"
os: ubuntu-latest
experimental: false
nox-session: test_brotlipy
# Test CPython with a broken hostname_checks_common_name (the fix is in 3.9.3)
- python-version: "3.9.2"
os: ubuntu-20.04 # CPython 3.9.2 is not available for ubuntu-22.04.
experimental: false
nox-session: test-3.9
- python-version: 3.11
os: ubuntu-20.04
experimental: true
nox-session: test-3.11
- python-version: 3.11
os: ubuntu-22.04
experimental: true
nox-session: test-3.11
exclude:
# Ubuntu 22.04 comes with OpenSSL 3.0, so only CPython 3.9+ is compatible with it
# https://github.com/python/cpython/issues/83001
- python-version: "3.7"
os: ubuntu-22.04
- python-version: "3.8"
os: ubuntu-22.04
runs-on: ${{ matrix.os }}
name: ${{ fromJson('{"macos-11":"macOS","windows-latest":"Windows","ubuntu-latest":"Ubuntu","ubuntu-20.04":"Ubuntu 20.04 (OpenSSL 1.1.1)","ubuntu-22.04":"Ubuntu 22.04 (OpenSSL 3.0)"}')[matrix.os] }} ${{ matrix.python-version }} ${{ matrix.nox-session}}
continue-on-error: ${{ matrix.experimental }}
timeout-minutes: 30
steps:
- name: "Checkout repository"
uses: "actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b"
- name: "Setup Python ${{ matrix.python-version }}"
uses: "actions/setup-python@5ccb29d8773c3f3f653e1705f474dfaa8a06a912"
with:
python-version: ${{ matrix.python-version }}
# Use deadsnakes for development versions
- if: endsWith(matrix.python-version, '-dev')
name: "Setup Python ${{ matrix.python-version }}"
uses: deadsnakes/action@e3117c2981fd8afe4af79f3e1be80066c82b70f5
with:
python-version: ${{ matrix.python-version }}
# Setup Python 3.x to run nox on behalf of Python 2.7
- if: matrix.python-version == '2.7'
name: "Setup Python 3.x"
uses: "actions/setup-python@5ccb29d8773c3f3f653e1705f474dfaa8a06a912"
with:
python-version: "3.x"
cache: "pip"
- name: "Install dependencies"
run: python -m pip install --upgrade pip setuptools nox
- name: "Run tests"
run: ./ci/run_tests.sh
env:
PYTHON_VERSION: ${{ matrix.python-version }}
NOX_SESSION: ${{ matrix.nox-session }}
- if: ${{ matrix.nox-session != 'unsupported_setup_py' }}
name: "Upload artifact"
uses: "actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce"
with:
name: coverage-data
path: ".coverage.*"
if-no-files-found: error
coverage:
runs-on: "ubuntu-latest"
needs: test
steps:
- name: "Checkout repository"
uses: "actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b"
- name: "Setup Python"
uses: "actions/setup-python@5ccb29d8773c3f3f653e1705f474dfaa8a06a912"
with:
python-version: "3.x"
- name: "Install coverage"
run: "python -m pip install --upgrade coverage"
- name: "Download artifact"
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
with:
name: coverage-data
- name: "Combine & check coverage"
run: |
python -m coverage combine
python -m coverage html --skip-covered --skip-empty
python -m coverage report --ignore-errors --show-missing --fail-under=100
- if: ${{ failure() }}
name: "Upload report if check failed"
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
with:
name: coverage-report
path: htmlcov