Skip to content

ci: Add more integration tests in Fedora #800

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .distro/plans/examples.fmf
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
summary: Documentation examples
discover+:
how: fmf
filter: "tag: examples"
path: docs
execute:
how: tmt
5 changes: 4 additions & 1 deletion .distro/plans/main.fmf
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
discover:
how: fmf
path: .

adjust+:
# Cannot use initiator: fedora-ci reliably yet
when: initiator is not defined or initiator != packit
discover+:
how: fmf
dist-git-source: true
dist-git-extract: scikit_build_core-*/
File renamed without changes.
20 changes: 16 additions & 4 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,39 @@ _:
- &build-in-scikit-build
<<: *build-in-packit
owner: "@scikit-build"
- &tests
- &tests-downstream
job: tests
fmf_path: .distro
identifier: downstream
- &tests-upstream
job: tests
skip_build: true
identifier: upstream
targets:
- fedora-development

jobs:
# Upstream jobs
- <<: *build-in-scikit-build
trigger: release
project: release
- <<: *tests
- <<: *tests-downstream
trigger: release
- <<: *build-in-scikit-build
trigger: commit
branch: main
project: nightly
- <<: *tests
- <<: *tests-downstream
trigger: commit
branch: main
- <<: *tests-upstream
trigger: commit
branch: main
- <<: *build-in-packit
trigger: pull_request
- <<: *tests
- <<: *tests-downstream
trigger: pull_request
- <<: *tests-upstream
trigger: pull_request
# Downstream jobs
- job: propose_downstream
Expand Down
1 change: 1 addition & 0 deletions docs/examples/downstream/main.fmf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
summary: Downstream example
environment:
HAS_PYTEST: true
require+:
Expand Down
10 changes: 6 additions & 4 deletions docs/examples/downstream/nanobind_example/main.fmf
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
summary: Nanobind downstream example
summary+: " (nanobind)"
require+:
# TODO: These don't make sense to be packaged in a different package
- python3-nanobind-devel
adjust:
when: distro < fedora-41 or distro == centos-stream
enabled: false
because: Nanobind is not yet packaged on Fedora
#require+:
# - python3dist(nanobind)
because: They have not packaged nanobind there
2 changes: 1 addition & 1 deletion docs/examples/downstream/pybind11_example/main.fmf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
summary: Pybind downstream example
summary+: " (pybind11)"
require+:
- gcc-c++
- python3dist(pybind11)
2 changes: 1 addition & 1 deletion docs/examples/getting_started/abi3/main.fmf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
summary: Abi3 example project
summary+: " (Abi3)"
2 changes: 1 addition & 1 deletion docs/examples/getting_started/c/main.fmf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
summary: C example project
summary+: " (C)"
2 changes: 1 addition & 1 deletion docs/examples/getting_started/cython/main.fmf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
summary: Cython example project
summary+: " (cython)"
require+:
- python3dist(cython)
2 changes: 1 addition & 1 deletion docs/examples/getting_started/fortran/main.fmf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
summary: F2PY example project
summary+: " (F2PY)"
require+:
- gcc-gfortran
- python3dist(numpy)
Expand Down
1 change: 1 addition & 0 deletions docs/examples/getting_started/main.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
summary: Getting started
10 changes: 6 additions & 4 deletions docs/examples/getting_started/nanobind/main.fmf
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
summary: Nanobind example project
summary+: " (nanobind)"
require+:
# TODO: These don't make sense to be packaged in a different package
- python3-nanobind-devel
adjust:
when: distro < fedora-41 or distro == centos-stream
enabled: false
because: Nanobind is not yet packaged on Fedora
#require+:
# - python3dist(nanobind)
because: They have not packaged nanobind there
2 changes: 1 addition & 1 deletion docs/examples/getting_started/pybind11/main.fmf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
summary: Pybind example project
summary+: " (pybind11)"
require+:
- gcc-c++
- python3dist(pybind11)
2 changes: 1 addition & 1 deletion docs/examples/getting_started/swig/main.fmf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
summary: Swig example project
summary+: " (Swig)"
require+:
- swig
2 changes: 1 addition & 1 deletion docs/examples/main.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ require:
- tree
framework: beakerlib
path: /
test: ./examples/test.sh
test: ./docs/examples/test.sh
4 changes: 2 additions & 2 deletions docs/examples/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rlJournalStart
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
rlRun "rsync -r .$TMT_TEST_NAME/ $tmp" 0 "Copy example project"
if [ "${HAS_PYTEST}" != True ]; then
rlRun "rsync -r ./examples/getting_started/test.py $tmp" 0 "Copy test.py file"
rlRun "rsync -r ./docs/examples/getting_started/test.py $tmp" 0 "Copy test.py file"
fi
rlRun "pushd $tmp"
rlRun "tree" 0 "Show directory tree"
Expand All @@ -18,7 +18,7 @@ rlJournalStart
rlPhaseEnd

rlPhaseStartTest
rlRun "pip install . -v --config-settings=build.verbose=true --no-index --no-build-isolation" 0 "Build the python project"
rlRun "pip install . -v --no-index --no-build-isolation" 0 "Build the python project"
if [ "${HAS_PYTEST}" == True ]; then
rlRun "python3 -m pytest" 0 "Run built-in pytest"
else
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ filterwarnings = [
"error",
"ignore:Config variable '.*' is unset, Python ABI tag may be incorrect:RuntimeWarning",
"default:pkg_resources is deprecated as an API:DeprecationWarning:wheel", # Caused by wheel<0.41 in tests
"default:The 'wheel' package is no longer the canonical location:DeprecationWarning", # Caused by wheel also
"default:onerror argument is deprecated, use onexc instead:DeprecationWarning:wheel", # Caused by wheel<0.41 & Python 3.12
"default:The distutils package is deprecated and slated for removal:DeprecationWarning", # Caused by setuptools sometimes
"default:The distutils.sysconfig module is deprecated, use sysconfig instead:DeprecationWarning", # Caused by setuptools sometimes
Expand Down
17 changes: 17 additions & 0 deletions tests/main.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/pytest:
summary: Run pytest tests
tag: [ pytest ]
# TODO: filter only for network marked tests
/all:
summary: All pytest
# TODO: Find a better way to deal with lack of git data
path: /
test: |
# Fake a git archive
cat << EOF > .git_archival.txt
node: 47431d4eefbac9c3a7c49e62c73e624b932023eb
node-date: 2025-02-27T16:18:39-05:00
describe-name: v0.11.0
EOF
# Actually run pytest
python3 -m pytest
35 changes: 35 additions & 0 deletions tests/plans.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/:
inherit: false

/pytest:
summary: Run all pytest
prepare:
- name: Install test packages
how: install
package:
# Pip install everything
- python3-pip
# Test everything we got
- gcc-c++
- gfortran
- cmake
- ninja-build
# For FindPython
- python3-devel
# There are tests that use FetchContent git
- git
- name: Prepare environment
how: shell
script: |
# Fake a git archive
cat << EOF > .git_archival.txt
node: 47431d4eefbac9c3a7c49e62c73e624b932023eb
node-date: 2025-02-27T16:18:39-05:00
describe-name: v0.11.0
EOF
pip install --user .[test]
discover:
how: fmf
filter: "tag: pytest"
execute:
how: tmt
Loading