Skip to content

Fix checking against frame_count in Screencopy.match #648

Fix checking against frame_count in Screencopy.match

Fix checking against frame_count in Screencopy.match #648

Workflow file for this run

name: Test
concurrency:
group: ${{ github.workflow }}-${{ github.event.number && format('pr{0}', github.event.number) || github.ref_name }}
cancel-in-progress: true
on:
merge_group:
types: [checks_requested]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- .github/workflows/test*yml
- mir-ci/**
jobs:
RunTests:
strategy:
fail-fast: false
matrix:
server:
- mir_kiosk
- ubuntu_frame
- confined_shell
- mir_test_tools
- mir_demo_server
- gnome_shell
include:
- server: null
mark: self
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: actions/checkout@v4
- id: pytest-args
name: Determine pytest arguments
run: |
ARGS=( --verbose --capture=no )
[ -n '${{ matrix.server }}' ] && ARGS+=( -k ${{ matrix.server }} )
[ -n '${{ matrix.mark }}' ] && ARGS+=( -m ${{ matrix.mark }} )
[ '${{ matrix.mark }}' == 'self' ] && ARGS+=( --cov --cov-branch --cov-report=xml )
echo args=${ARGS[@]} >> $GITHUB_OUTPUT
- name: Set up dependencies
working-directory: mir-ci/mir_ci
run: |
sudo apt-get --yes install pkg-config libwayland-dev
pip install -e ..
[ '${{ matrix.mark }}' == 'self' ] && pip install pytest-cov
python -m pytest ${{ steps.pytest-args.outputs.args }} --deps
- name: Run the tests
working-directory: mir-ci/mir_ci
env:
MIR_CI_VARIANT: 1024
run: |
# set up coredumps
ulimit -c unlimited
echo "/tmp/corefile-%e-%p-%t" | sudo tee /proc/sys/kernel/core_pattern
sudo systemd-run --uid 1001 -p Environment=XDG_SESSION_TYPE=wayland -p PAMName=login -p TTYPath=/dev/tty1 -- tail -f /dev/null
python -m pytest ${{ steps.pytest-args.outputs.args }} --junitxml=junit-${{ matrix.server || matrix.mark }}-${{ matrix.python }}.xml
- name: Upload test results
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-results-${{ matrix.server || matrix.mark }}
path: |
mir-ci/mir_ci/junit-*.xml
/tmp/pytest-of-*/*-current/**/log.html
- if: ${{ matrix.mark == 'self' }}
name: Upload coverage data
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: mir-ci/mir_ci
fail_ci_if_error: true
verbose: true
- if: ${{ failure() }}
name: Collect any core dumps
run: |
sudo find /tmp/ -name corefile-* -exec chown $UID {} \; -exec mv -v {} . \;
- if: ${{ failure() }}
name: Upload any core dumps
uses: actions/upload-artifact@v4
with:
name: core-dumps-${{ matrix.server || matrix.mark }}
path: corefile-*
if-no-files-found: ignore
- if: ${{ failure() && runner.debug }}
name: Setup tmate session
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true
ProcessArtifacts:
runs-on: ubuntu-latest
needs: RunTests
if: ${{ success() || failure() }}
steps:
- uses: actions/checkout@v4
- name: Merge junit reports
uses: actions/upload-artifact/merge@v4
with:
name: test-results
pattern: test-results-*
separate-directories: true
delete-merged: true
- name: Download the test results
uses: actions/download-artifact@v4
with:
name: test-results
- name: Report test results
uses: dorny/test-reporter@v1
with:
name: "Test results"
path: '**/junit-*.xml'
reporter: java-junit