fix: solved scaling issue for mpvpaper #344
This file contains hidden or 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: "Darwin Tests" | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| on: | |
| push: | |
| branches: [develop, main] | |
| pull_request: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 6 * * 1" # Every Monday at 06:00 UTC | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test-darwin: | |
| runs-on: macos-14 | |
| timeout-minutes: 90 | |
| permissions: | |
| contents: read | |
| env: | |
| NIXPKGS_ALLOW_UNFREE: 1 | |
| FLAKE_ROOT: ${{ github.workspace }} | |
| WEBHOOK_ID: ${{ secrets.DISCORD_WEBHOOK_ID }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Nix | |
| uses: DeterminateSystems/nix-installer-action@main | |
| with: | |
| flakehub: false | |
| extra-conf: | | |
| auto-optimise-store = true | |
| experimental-features = nix-command flakes | |
| access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
| extra-substituters = https://catppuccin.cachix.org https://krit-nixos.cachix.org | |
| extra-trusted-public-keys = catppuccin.cachix.org-1:noG/4HkbhJb+lUAdKrph6LaozJvAeEEZj4N732n/9sI= krit-nixos.cachix.org-1:54bU6/gPbvP4X+nu2apEx343noMoo3Jln8LzYfKD7ks= | |
| - name: "Test: minimal-defaults (Darwin)" | |
| id: minimal-defaults | |
| continue-on-error: true | |
| run: bash templates/tests/darwin/test-minimal-defaults/check-darwin-minimal-defaults.sh | |
| - name: Summary and notify on failure | |
| # always() && WEBHOOK_ID: on a fork without secrets the webhook URL is | |
| # malformed, so this would curl a broken endpoint on every single run. | |
| # continue-on-error: a Discord outage must never turn a passing test | |
| # suite into a failed job - the notice is secondary to the result. | |
| if: always() && env.WEBHOOK_ID != '' | |
| continue-on-error: true | |
| env: | |
| WEBHOOK_URL: https://discord.com/api/webhooks/${{ secrets.DISCORD_WEBHOOK_ID }}/${{ secrets.DISCORD_WEBHOOK_TOKEN }} | |
| EVENT_NAME: ${{ github.event_name }} | |
| REF_NAME: ${{ github.ref_name }} | |
| RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
| MINIMAL_OUTCOME: ${{ steps.minimal-defaults.outcome }} | |
| run: | | |
| FAILED=() | |
| [[ "$MINIMAL_OUTCOME" != "success" ]] && FAILED+=("✗ minimal-defaults (Darwin)") | |
| if [[ ${#FAILED[@]} -eq 0 ]]; then | |
| echo "All Darwin tests passed." | |
| exit 0 | |
| fi | |
| echo "Failed tests: ${FAILED[*]}" | |
| if [[ -n "$WEBHOOK_ID" ]]; then | |
| REPORT=$(printf '%s\n' "${FAILED[@]}") | |
| jq -n \ | |
| --arg report "$REPORT" \ | |
| --arg ref "$REF_NAME" \ | |
| --arg event "$EVENT_NAME" \ | |
| --arg url "$RUN_URL" \ | |
| '{content: "🧪 **Darwin Tests Failed** | `\($ref)` (\($event))\n```\n\($report)\n```\n🔗 \($url)"}' \ | |
| > payload.json | |
| # --fail so a rotated/revoked webhook is not reported as delivered, and | |
| # `|| echo` so the notice never fails the step (and is never the last | |
| # command left returning non-zero under bash -e). | |
| curl -sS --fail -H "Content-Type: application/json" -d @payload.json "$WEBHOOK_URL" \ | |
| || echo "::warning::Discord webhook delivery failed - the notification above was NOT sent." | |
| fi | |
| exit 1 |