You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
2.5 KiB
53 lines
2.5 KiB
# Tests after the app is built. |
|
|
|
# Validate the metainfo with Flathub's tool. |
|
lint-metainfo: |
|
stage: test |
|
image: |
|
name: "ghcr.io/flathub/flatpak-builder-lint:latest" |
|
entrypoint: [""] |
|
variables: |
|
METAINFO: "${APP_ID}.metainfo.xml" |
|
script: |
|
# This tool has extra tests on top of appstreamcli and is required to pass for Flathub. |
|
- flatpak-builder-lint appstream ${METAINFO} |
|
# Test also with the pedantic and strict flags. |
|
- appstreamcli validate --pedantic --explain --strict ${METAINFO} |
|
needs: ["build@x86_64"] |
|
|
|
# Run the Rust tests. |
|
rust-tests: |
|
stage: test |
|
image: 'quay.io/gnome_infrastructure/gnome-runtime-images:gnome-master' |
|
tags: |
|
- flatpak |
|
variables: |
|
TMP_MANIFEST_PATH: "build-aux/org.gnome.Fractal.CiRust.json" |
|
script: |
|
# Add a module for nextest to the Flatpak manifest |
|
- jq --slurpfile nextest .gitlab-ci/nextest.module.json '.modules = [$nextest[], .modules[]]' ${MANIFEST_PATH} > ${TMP_MANIFEST_PATH} |
|
- flatpak-builder --keep-build-dirs --user --disable-rofiles-fuse --stop-at=${FLATPAK_MODULE} flatpak_app --repo=repo ${BRANCH:+--default-branch=$BRANCH} ${TMP_MANIFEST_PATH} |
|
- echo "cargo-nextest nextest run --config-file ../.gitlab-ci/nextest.toml" | flatpak-builder --disable-rofiles-fuse --build-shell=${FLATPAK_MODULE} flatpak_app ${TMP_MANIFEST_PATH} |
|
dependencies: [] |
|
artifacts: |
|
reports: |
|
junit: '.flatpak-builder/build/${FLATPAK_MODULE}/target/nextest/default/junit.xml' |
|
|
|
# Test that there are no errors in the docs. |
|
build-docs: |
|
stage: test |
|
image: 'quay.io/gnome_infrastructure/gnome-runtime-images:gnome-master' |
|
tags: |
|
- flatpak |
|
script: |
|
- flatpak install --user --noninteractive org.freedesktop.Sdk.Extension.rust-nightly//24.08 |
|
# We want to use the nightly toolchain inside the build terminal. |
|
- sed -i 's|"org.freedesktop.Sdk.Extension.rust-stable"|"org.freedesktop.Sdk.Extension.rust-nightly"|g' ${MANIFEST_PATH} |
|
- sed -i 's|/rust-stable/bin|/rust-nightly/extra/sdk/rust-nightly/bin|g' ${MANIFEST_PATH} |
|
- flatpak-builder --keep-build-dirs --user --disable-rofiles-fuse --stop-at=${FLATPAK_MODULE} flatpak_app --repo=repo ${BRANCH:+--default-branch=$BRANCH} ${MANIFEST_PATH} |
|
- echo "ninja src/doc" | flatpak-builder --disable-rofiles-fuse --build-shell=${FLATPAK_MODULE} flatpak_app ${MANIFEST_PATH} |
|
- tar --auto-compress --create --file "${CI_PROJECT_DIR}/${CI_PROJECT_NAME}-docs.tar.gz" --directory ".flatpak-builder/build/${FLATPAK_MODULE}/_flatpak_build/src/doc" . |
|
dependencies: [] |
|
artifacts: |
|
paths: |
|
- ${CI_PROJECT_NAME}-docs.tar.gz
|
|
|