summaryrefslogtreecommitdiffstats
path: root/.github/workflows
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:20:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:20:41 +0000
commitb49f1524e250764592ff132af8fb0d39182620f7 (patch)
treea2c4da0c1bfc3be79c9b80180d8958804e91a07d /.github/workflows
parentInitial commit. (diff)
downloadpython-build-upstream.tar.xz
python-build-upstream.zip
Adding upstream version 0.9.0.upstream/0.9.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--.github/workflows/check.yml33
-rw-r--r--.github/workflows/test.yml131
2 files changed, 164 insertions, 0 deletions
diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml
new file mode 100644
index 0000000..c6e9bfb
--- /dev/null
+++ b/.github/workflows/check.yml
@@ -0,0 +1,33 @@
+name: check
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+ branches:
+ - main
+ schedule:
+ - cron: "0 8 * * *"
+
+jobs:
+ docs:
+ runs-on: ubuntu-latest
+ env:
+ PY_COLORS: 1
+ TOX_PARALLEL_NO_SPINNER: 1
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Setup Python 3.9
+ uses: actions/setup-python@v4
+ with:
+ python-version: 3.9
+
+ - name: Install tox
+ run: python -m pip install tox
+
+ - name: Setup run environment
+ run: tox -vv --notest -e docs
+
+ - name: Run check for docs
+ run: tox -e docs --skip-pkg-install
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..21e1321
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,131 @@
+name: test
+on:
+ push:
+ branches:
+ - main
+ paths-ignore:
+ - "docs/**"
+ - "*.md"
+ pull_request:
+ branches:
+ - main
+ paths-ignore:
+ - "docs/**"
+ - "*.md"
+ schedule:
+ - cron: "0 8 * * *"
+ workflow_dispatch:
+
+concurrency:
+ group: test-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ pytest:
+ runs-on: ${{ matrix.os }}-latest
+ env:
+ PYTEST_ADDOPTS: "--run-integration --showlocals -vv --durations=10 --reruns 5 --only-rerun subprocess.CalledProcessError"
+ strategy:
+ fail-fast: false
+ matrix:
+ os:
+ - ubuntu
+ - macos
+ - windows
+ py:
+ - "pypy-3.7"
+ - "pypy-3.8"
+ - "pypy-3.9"
+ - "3.11"
+ - "3.10"
+ - "3.9"
+ - "3.8"
+ - "3.7"
+ - "3.6"
+ tox-target:
+ - "tox"
+ - "min"
+
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+
+ - name: Setup python for test ${{ matrix.py }}
+ uses: actions/setup-python@v4
+ with:
+ python-version: ${{ matrix.py }}
+
+ - name: Pick environment to run
+ run: |
+ import platform
+ import os
+ import sys
+
+ if platform.python_implementation() == "PyPy":
+ base = f"pypy{sys.version_info.major}{sys.version_info.minor}"
+ else:
+ base = f"py{sys.version_info.major}{sys.version_info.minor}"
+ env = f"BASE={base}\n"
+ print(f"Picked:\n{env}for {sys.version}")
+ with open(os.environ["GITHUB_ENV"], "a", encoding="utf-8") as file:
+ file.write(env)
+ shell: python
+
+ - name: Setup python for tox
+ uses: actions/setup-python@v4
+ with:
+ python-version: 3.9
+
+ - name: Install tox
+ run: python -m pip install tox
+
+ - name: Run test suite via tox
+ if: matrix.tox-target == 'tox'
+ run: |
+ tox -vv --notest -e ${{env.BASE}}
+ tox -e ${{env.BASE}} --skip-pkg-install
+
+ - name: Run minimum version test
+ if: matrix.tox-target == 'min'
+ run: tox -e ${{env.BASE}}-${{ matrix.tox-target }}
+
+ - name: Run path test
+ if: matrix.tox-target == 'tox' && matrix.py == '3.10'
+ run: tox -e path
+
+ - name: Combine coverage files
+ if: always()
+ run: tox -e coverage
+
+ - uses: codecov/codecov-action@v3
+ 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@v3
+
+ - name: Setup Python 3.9
+ uses: actions/setup-python@v4
+ 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