From 958946936ecbf4803995c43e550c7b94091847ee Mon Sep 17 00:00:00 2001 From: Joachim Metz Date: Sun, 5 May 2024 13:48:53 +0200 Subject: [PATCH] Changes for CI tests (#232) --- .github/workflows/test_docker.yml | 35 +++++++++++-------------------- .github/workflows/test_docs.yml | 4 ++-- .github/workflows/test_tox.yml | 16 +++++++------- 3 files changed, 23 insertions(+), 32 deletions(-) diff --git a/.github/workflows/test_docker.yml b/.github/workflows/test_docker.yml index 7b8985d..b196a9c 100644 --- a/.github/workflows/test_docker.yml +++ b/.github/workflows/test_docker.yml @@ -11,14 +11,14 @@ jobs: container: image: registry.fedoraproject.org/fedora:${{ matrix.version }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up container run: | dnf install -y dnf-plugins-core langpacks-en - name: Install dependencies run: | dnf copr -y enable @gift/dev - dnf install -y @development-tools python3 python3-devel libcreg-python3 libregf-python3 python3-dfdatetime python3-dtfabric python3-pyyaml python3-setuptools + dnf install -y @development-tools libcreg-python3 libregf-python3 python3 python3-build python3-devel python3-dfdatetime python3-dtfabric python3-pyyaml python3-setuptools python3-wheel - name: Run tests env: LANG: C.utf8 @@ -27,16 +27,12 @@ jobs: - name: Run end-to-end tests run: | if test -f tests/end-to-end.py; then PYTHONPATH=. python3 ./tests/end-to-end.py --debug -c config/end-to-end.ini; fi - - name: Build source distribution + - name: Build source distribution (sdist) run: | - python3 ./setup.py sdist - - name: Build binary distribution + python3 -m build --no-isolation --sdist + - name: Build binary distribution (wheel) run: | - python3 ./setup.py bdist - - name: Run build and install test - run: | - python3 ./setup.py build - python3 ./setup.py install + python3 -m build --no-isolation --wheel test_ubuntu: runs-on: ubuntu-latest strategy: @@ -45,7 +41,7 @@ jobs: container: image: ubuntu:${{ matrix.version }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up container env: DEBIAN_FRONTEND: noninteractive @@ -58,7 +54,7 @@ jobs: run: | add-apt-repository -y ppa:gift/dev apt-get update -q - apt-get install -y build-essential python3 python3-dev libcreg-python3 libregf-python3 python3-dfdatetime python3-distutils python3-dtfabric python3-pip python3-setuptools python3-wheel python3-yaml + apt-get install -y build-essential libcreg-python3 libregf-python3 python3 python3-build python3-dev python3-dfdatetime python3-dtfabric python3-pip python3-setuptools python3-wheel python3-yaml - name: Run tests env: LANG: en_US.UTF-8 @@ -69,16 +65,9 @@ jobs: LANG: en_US.UTF-8 run: | if test -f tests/end-to-end.py; then PYTHONPATH=. python3 ./tests/end-to-end.py --debug -c config/end-to-end.ini; fi - - name: Update setuptools - run: | - python3 -m pip install -U setuptools - - name: Build source distribution - run: | - python3 ./setup.py sdist - - name: Build binary distribution + - name: Build source distribution (sdist) run: | - python3 ./setup.py bdist - - name: Run build and install test + python3 -m build --no-isolation --sdist + - name: Build binary distribution (wheel) run: | - python3 ./setup.py build - python3 ./setup.py install + python3 -m build --no-isolation --wheel diff --git a/.github/workflows/test_docs.yml b/.github/workflows/test_docs.yml index 23d1116..28fc284 100644 --- a/.github/workflows/test_docs.yml +++ b/.github/workflows/test_docs.yml @@ -19,7 +19,7 @@ jobs: container: image: ubuntu:22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up container env: DEBIAN_FRONTEND: noninteractive @@ -36,7 +36,7 @@ jobs: add-apt-repository -y ppa:deadsnakes/ppa add-apt-repository -y ppa:gift/dev apt-get update -q - apt-get install -y build-essential git python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv libcreg-python3 libregf-python3 python3-dfdatetime python3-distutils python3-dtfabric python3-pip python3-setuptools python3-yaml + apt-get install -y build-essential git python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv libcreg-python3 libregf-python3 python3-dfdatetime python3-distutils python3-dtfabric python3-lib2to3 python3-pip python3-setuptools python3-yaml - name: Install tox run: | python3 -m pip install tox diff --git a/.github/workflows/test_tox.yml b/.github/workflows/test_tox.yml index d6de1f3..8843ab6 100644 --- a/.github/workflows/test_tox.yml +++ b/.github/workflows/test_tox.yml @@ -27,7 +27,7 @@ jobs: container: image: ubuntu:22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up container env: DEBIAN_FRONTEND: noninteractive @@ -44,7 +44,7 @@ jobs: add-apt-repository -y ppa:deadsnakes/ppa add-apt-repository -y ppa:gift/dev apt-get update -q - apt-get install -y build-essential git python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv libcreg-python3 libregf-python3 python3-dfdatetime python3-distutils python3-dtfabric python3-pip python3-setuptools python3-yaml + apt-get install -y build-essential git python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv libcreg-python3 libregf-python3 python3-dfdatetime python3-distutils python3-dtfabric python3-lib2to3 python3-pip python3-setuptools python3-yaml - name: Install tox run: | python3 -m pip install tox @@ -63,7 +63,7 @@ jobs: container: image: ubuntu:22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up container env: DEBIAN_FRONTEND: noninteractive @@ -80,7 +80,7 @@ jobs: add-apt-repository -y ppa:deadsnakes/ppa add-apt-repository -y ppa:gift/dev apt-get update -q - apt-get install -y build-essential git python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv libcreg-python3 libregf-python3 python3-dfdatetime python3-distutils python3-dtfabric python3-pip python3-setuptools python3-yaml + apt-get install -y build-essential git python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv libcreg-python3 libregf-python3 python3-dfdatetime python3-distutils python3-dtfabric python3-lib2to3 python3-pip python3-setuptools python3-yaml - name: Install tox run: | python3 -m pip install tox @@ -90,7 +90,9 @@ jobs: run: | tox -e${{ matrix.toxenv }} - name: Upload coverage report to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} lint: runs-on: ubuntu-latest strategy: @@ -101,7 +103,7 @@ jobs: container: image: ubuntu:22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up container env: DEBIAN_FRONTEND: noninteractive @@ -118,7 +120,7 @@ jobs: add-apt-repository -y ppa:deadsnakes/ppa add-apt-repository -y ppa:gift/dev apt-get update -q - apt-get install -y build-essential git python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv libcreg-python3 libregf-python3 python3-dfdatetime python3-distutils python3-dtfabric python3-pip python3-setuptools python3-yaml + apt-get install -y build-essential git python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv libcreg-python3 libregf-python3 python3-dfdatetime python3-distutils python3-dtfabric python3-lib2to3 python3-pip python3-setuptools python3-yaml - name: Install tox run: | python3 -m pip install tox