Test 24.08 runtime #1277
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: master | |
paths-ignore: | |
- 'flatpak_builder_lint/staticfiles/exceptions.json' | |
pull_request: | |
branches: master | |
paths-ignore: | |
- 'flatpak_builder_lint/staticfiles/exceptions.json' | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Validate exceptions.json | |
run: python3 utils/validator.py | |
- name: Set up dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y flatpak flatpak-builder curl dbus-daemon libgirepository1.0-dev gir1.2-ostree-1.0 | |
- name: Setup Poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - | |
sudo ln -s /github/home/.local/bin/poetry /usr/bin/poetry | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pypoetry | |
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} | |
- name: Install python dependencies | |
run: | | |
poetry install | |
- name: Check module sort order | |
run: poetry run ruff check --select I flatpak_builder_lint | |
- name: Check code formatting | |
run: poetry run black --check flatpak_builder_lint | |
- name: Check code errors | |
run: poetry run flake8p flatpak_builder_lint | |
- name: Check python types | |
run: poetry run mypy flatpak_builder_lint | |
- name: Allow file:// clones with git>=2.38.1 | |
run: | | |
git config --global protocol.file.allow always | |
- name: Set up flathub remote | |
run: | | |
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo | |
flatpak remote-add --user --if-not-exists flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo | |
- name: Build and test org.flatpak.Builder | |
run: | | |
git clone --depth=1 --branch bbhtt/fdo-2408 --recursive --single-branch https://github.com/flathub/org.flatpak.Builder.git build/org.flatpak.Builder | |
cd build && python3 ../docker/rewrite-manifest.py && cd org.flatpak.Builder | |
rm -v flatpak-builder-lint-deps.json && cp -v ../../docker/flatpak-builder-lint-deps.json . | |
flatpak-builder --verbose --user --force-clean --repo=repo \ | |
--install-deps-from=flathub --default-branch=localtest --ccache \ | |
--install builddir org.flatpak.Builder.json | |
flatpak run org.flatpak.Builder//localtest --version | |
- name: Sanity check the linter | |
run: | | |
cd build/org.flatpak.Builder | |
flatpak run --command=flatpak-builder-lint org.flatpak.Builder//localtest --exceptions manifest org.flatpak.Builder.json | |
flatpak run --command=flatpak-builder-lint org.flatpak.Builder//localtest --exceptions builddir builddir | |
flatpak run --command=flatpak-builder-lint org.flatpak.Builder//localtest --exceptions repo repo | |
- name: Set up appstreamcli | |
run: | | |
echo '#!/bin/sh' > /usr/local/bin/appstreamcli | |
echo "exec flatpak run --branch=localtest --env=LD_DEBUG=libs --command=appstreamcli org.flatpak.Builder \${@}" >> /usr/local/bin/appstreamcli | |
chmod +x /usr/local/bin/appstreamcli | |
appstreamcli --version | |
flatpak run --command=sh org.flatpak.Builder//localtest -c "ldconfig -v 2>/dev/null | grep -v ^$'\t'" | |
flatpak run --command=ldd org.flatpak.Builder//localtest /app/bin/appstreamcli | |
flatpak run --command=ls org.flatpak.Builder//localtest -lA /app/lib | |
- name: Run test suite | |
run: | | |
poetry run pytest -vvv tests |