diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 494784be292..13ea8ebc01a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,53 +8,6 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: - build: - runs-on: ubuntu-latest - container: quay.io/sssd/ci-client-devel:latest - permissions: - contents: read - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Install dependencies - id: dependencies - uses: ./.github/actions/install-dependencies - - - name: Configure sssd - uses: ./.github/actions/configure - - - name: make - shell: bash - working-directory: x86_64 - run: | - source ../contrib/fedora/bashrc_sssd - make CFLAGS+="$SSS_WARNINGS -Werror -Wno-error=deprecated-declarations" - - - name: make check - shell: bash - working-directory: x86_64 - run: | - source ../contrib/fedora/bashrc_sssd - make CFLAGS+="$SSS_WARNINGS -Werror -Wno-error=deprecated-declarations" check - - - name: make distcheck - shell: bash - working-directory: x86_64 - run: | - source ../contrib/fedora/bashrc_sssd - make distcheck - - - uses: actions/upload-artifact@v4 - if: always() - with: - name: build - path: | - x86_64/config.log - x86_64/config.h - x86_64/test-suite.log - if-no-files-found: ignore - prepare: runs-on: ubuntu-latest permissions: @@ -69,75 +22,8 @@ jobs: id: matrix run: ./contrib/ci/get-matrix.py --action - intgcheck: - needs: [prepare, build] - strategy: - fail-fast: false - matrix: - tag: ${{ fromJson(needs.prepare.outputs.matrix).intgcheck }} - runs-on: ubuntu-latest - permissions: - contents: read - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - path: sssd - - - name: Setup containers - uses: SSSD/sssd-ci-containers/actions/setup@master - with: - path: sssd-ci-containers - tag: ${{ matrix.tag }} - limit: dns client - override: | - services: - client: - image: ${REGISTRY}/ci-client-devel:${TAG} - volumes: - - ../sssd:/sssd:rw - - - name: Run integration tests - uses: SSSD/sssd-ci-containers/actions/exec@master - with: - working-directory: /sssd - script: ./contrib/ci/run --moderate - - - name: Print logs - uses: next-actions/print-logs@master - if: always() - with: - working-directory: ./sssd/ci-build-debug - files: | - test-suite.log - ci-make-intgcheck.log - ci-make-distcheck.log - - - name: Upload main artifacts - if: always() - uses: actions/upload-artifact@v4 - with: - if-no-files-found: ignore - name: ${{ matrix.tag }}-intgcheck - path: | - ./sssd/var/log/sssd/*.log - ./sssd/ci-build-debug/ci-*.log - ./sssd/ci-build-debug/config.log - ./sssd/ci-build-debug/test-suite.log - ./sssd/ci-build-debug/ci-mock-result/*.log - ./sssd/ci-build-debug/src/tests/cwrap/test-suite.log - - - name: Upload valgrind artifacts - if: always() - uses: actions/upload-artifact@v4 - with: - if-no-files-found: ignore - name: ${{ matrix.tag }}-intgcheck-valgrind - path: | - ./sssd/ci-build-debug/*.valgrind.log - system: - needs: [prepare, build] + needs: [prepare] strategy: fail-fast: false matrix: @@ -291,7 +177,11 @@ jobs: mkdir -p $GITHUB_WORKSPACE/artifacts source .venv/bin/activate - pytest \ + MH_CONNECTION_DEBUG=yes pytest \ + --mh-collect-logs=always \ + --mh-collect-artifacts=always \ + -k test_passkey \ + --mh-topology=ipa \ --color=yes \ --show-capture=no \ --mh-config=./mhc.yaml \ @@ -314,16 +204,3 @@ jobs: install.log pytest.log pytest-collect.log - - result: - name: All tests are successful - if: ${{ always() }} - runs-on: ubuntu-latest - needs: [build, intgcheck, system] - steps: - - name: Fail on failure - if: | - needs.build.result != 'success' - || needs.intgcheck.result != 'success' - || needs.system.result != 'success' - run: exit 1 diff --git a/contrib/fedora/make_srpm.sh b/contrib/fedora/make_srpm.sh index f19b283e118..b82294970a4 100755 --- a/contrib/fedora/make_srpm.sh +++ b/contrib/fedora/make_srpm.sh @@ -166,10 +166,21 @@ sed -e "s/@PACKAGE_NAME@/$PACKAGE_NAME/" \ > "$RPMBUILD/SPECS/$PACKAGE_NAME.spec" NAME="$PACKAGE_NAME-$PACKAGE_VERSION" +TARBALL="$RPMBUILD/SOURCES/$NAME.tar.gz" + git archive --format=tar --prefix="$NAME"/ \ --remote="file://$SRC_DIR" \ - HEAD \ - | gzip > "$RPMBUILD/SOURCES/$NAME.tar.gz" + HEAD | gzip > "$TARBALL" + +# fallback to tar if git archive failed +# tar may include more files so git archive is preferred +tar -tzf "$TARBALL" &> /dev/null +if [ $? -ne 0 ]; then + rm -f "$TARBALL" + pushd "$SRC_DIR" + tar -cvzf "$TARBALL" --transform "s,^,$NAME/," * + popd +fi cp "$SRC_DIR"/contrib/*.patch "$RPMBUILD/SOURCES" 2>/dev/null add_patches "$RPMBUILD/SPECS/$PACKAGE_NAME.spec" \ diff --git a/src/tests/system/mhc.yaml b/src/tests/system/mhc.yaml index 0f93ff2df7e..1c4bc887fc6 100644 --- a/src/tests/system/mhc.yaml +++ b/src/tests/system/mhc.yaml @@ -26,6 +26,8 @@ domains: - hostname: master.ipa.test role: ipa + artifacts: + - /var/log/iparestore.log config: client: ipa_domain: ipa.test diff --git a/src/tests/system/requirements.txt b/src/tests/system/requirements.txt index 788c9285d55..8ac6bf60885 100644 --- a/src/tests/system/requirements.txt +++ b/src/tests/system/requirements.txt @@ -5,4 +5,4 @@ git+https://github.com/next-actions/pytest-mh git+https://github.com/next-actions/pytest-ticket git+https://github.com/next-actions/pytest-tier git+https://github.com/next-actions/pytest-output -git+https://github.com/SSSD/sssd-test-framework +git+https://github.com/pbrezina/sssd-test-framework@citest