Skip to content

Bump actions/upload-artifact from 5 to 7 #480

Bump actions/upload-artifact from 5 to 7

Bump actions/upload-artifact from 5 to 7 #480

Workflow file for this run

# SPDX-FileCopyrightText: GSConnect Developers https://github.com/GSConnect
#
# SPDX-License-Identifier: GPL-2.0-or-later
name: CI
on:
push:
branches:
- main
- 'backports/gnome-*'
pull_request:
branches:
- main
- 'backports/gnome-*'
workflow_dispatch:
jobs:
select:
runs-on: ubuntu-latest
outputs:
image_id: ${{ steps.select-image.outputs.image_id }}
steps:
- id: step1
if: ${{ ! startsWith(github.event_name, 'pull_request') }}
run: echo "target=${{ github.ref_name }}" >> $GITHUB_OUTPUT
- id: step2
if: ${{ startsWith(github.event_name, 'pull_request') }}
run: echo "target=${{ github.base_ref }}" >> $GITHUB_OUTPUT
- id: select-image
env:
TARGET_BRANCH: ${{ steps.step1.outputs.target || steps.step2.outputs.target }}
run: |
if [[ \
${{ startsWith(env.TARGET_BRANCH, 'backports/') && 1 || 0 }} == 1 \
]]; then
IMAGE_ID=$(echo "$TARGET_BRANCH" | sed -e 's,^backports/,,')
echo "image_id=$IMAGE_ID" >> $GITHUB_OUTPUT
else
echo "image_id=latest" >> $GITHUB_OUTPUT
fi
test:
needs: select
runs-on: ubuntu-latest
container:
image: ghcr.io/gsconnect/gsconnect-ci:${{ needs.select.outputs.image_id }}
steps:
- uses: actions/checkout@v6
- name: Install node modules
run: npm install
- name: Prepare
run: |
meson --prefix=/usr \
--libdir=lib/ \
-Dgnome_shell_libdir=/usr/lib64/ \
_build
- name: Uninstalled Tests
run: |
meson test -C _build --suite gsconnect:data \
--suite gsconnect:lint \
--print-errorlogs
- name: Installed Tests
run: |
ninja -C _build install
if [[ \
${{ startsWith(env.TARGET_BRANCH, 'backports/gnome-42') && 1 || 0 }} == 1 \
]]; then
glib-compile-schemas /usr/share/glib-2.0/schemas/
fi
xvfb-run -a dbus-run-session -- \
gnome-desktop-testing-runner gsconnect -L _build/meson-logs
- name: Upload Test Logs
if: ${{ always() }}
uses: actions/upload-artifact@v7
with:
name: test-logs
path: _build/meson-logs
- name: Test Build
run: |
ninja -C _build make-zip
- name: Stage packaged extension
run: |
ninja -C _build make-pkgdir
- name: Create and upload packaged artifact
uses: actions/upload-artifact@v7
with:
name: [email protected]
path: _build/[email protected]/