Skip to content

Commit

Permalink
Only test 1.0, 1.5, and 2.0 scales
Browse files Browse the repository at this point in the history
Co-authored-by: Michał Sawicz <[email protected]>
  • Loading branch information
tarek-y-ismail and Saviq committed Aug 13, 2024
1 parent 0bcf524 commit 51cdaff
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
25 changes: 15 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,19 @@ jobs:
with:
lfs: true

- id: pytest-args
name: Determine pytest arguments
- id: vars
name: Determine variables
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
PYTEST_ARGS=( --verbose --capture=no )
[ -n '${{ matrix.server }}' ] && PYTEST_ARGS+=( -k ${{ matrix.server }} )
[ -n '${{ matrix.mark }}' ] && PYTEST_ARGS+=( -m ${{ matrix.mark }} )
[ '${{ matrix.mark }}' == 'self' ] && PYTEST_ARGS+=( --cov --cov-branch --cov-report=xml )
echo pytest_args=${PYTEST_ARGS[@]} >> $GITHUB_OUTPUT
ARTIFACT_KEY="${{ matrix.server || matrix.mark }}"
[ -n '${{ matrix.channel }}' ] && ARTIFACT_KEY+="-$( echo ${{ matrix.channel }} | tr / _ ) )"
[ -n '${{ matrix.ppa }}' ] && ARTIFACT_KEY+="-$( echo ${{ matrix.ppa }} | tr / _ ) )"
echo artifact_key=${ARTIFACT_KEY[@]} >> $GITHUB_OUTPUT
- name: Set up dependencies
working-directory: mir-ci/mir_ci
Expand All @@ -78,7 +83,7 @@ jobs:
sudo apt-get --yes install pkg-config libwayland-dev ffmpeg
pip install -e ..
[ '${{ matrix.mark }}' == 'self' ] && pip install pytest-cov
python -m pytest ${{ steps.pytest-args.outputs.args }} --deps
python -m pytest ${{ steps.vars.outputs.pytest-args }} --deps
- name: Run the tests
working-directory: mir-ci/mir_ci
Expand All @@ -97,7 +102,7 @@ jobs:
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-results-${{ matrix.server && format('{0}-{1}-{2}', matrix.server, matrix.channel, matrix.ppa) || matrix.mark }}
name: test-results-${{ steps.vars.outputs.artifact_key }}
path: |
mir-ci/mir_ci/junit-*.xml
/tmp/pytest-of-*/*-current/**/log.html
Expand All @@ -120,7 +125,7 @@ jobs:
name: Upload any core dumps
uses: actions/upload-artifact@v4
with:
name: core-dumps-${{ matrix.server && format('{0}-{1}-{2}', matrix.server, matrix.channel, matrix.ppa) || matrix.mark }}
name: core-dumps-${{ steps.vars.outputs.artifact_key }}
path: corefile-*
if-no-files-found: ignore

Expand Down
2 changes: 1 addition & 1 deletion mir-ci/mir_ci/tests/test_fractional_scale_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def get_display_config(scale: float) -> dict:
)
@pytest.mark.env(GSETTINGS_BACKEND="keyfile")
@pytest.mark.parametrize("server", servers(ServerCap.FLOATING_WINDOWS | ServerCap.DISPLAY_CONFIG))
@pytest.mark.parametrize("scale", [1.0, 1.25, 1.5, 1.75, 2.0])
@pytest.mark.parametrize("scale", [1.0, 1.5, 2.0])
@pytest.mark.deps(
debs=("gtk-4-examples",),
pip_pkgs=(
Expand Down

0 comments on commit 51cdaff

Please sign in to comment.