weblate/.github/workflows/macos.yml
renovate[bot] 806697e34b
chore(deps): update codecov/codecov-action action to v6 (#18668)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-26 15:57:04 +00:00

80 lines
2.5 KiB
YAML

# Copyright © Michal Čihař <michal@weblate.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
name: macOS
on:
push:
branches-ignore:
- renovate/**
- weblate
- dependabot/**
- copilot/**
- codex/**
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
jobs:
macos:
# This verifies that installation instructions works, any changes here
# need to be reflected in docs/admin/install/venv-macos.rst
runs-on: macos-15
env:
PYTHONUNBUFFERED: 1
PYTHONWARNINGS: default,ignore:unclosed:ResourceWarning
CI_REDIS_HOST: localhost
CI_DB_HOST: localhost
DJANGO_SETTINGS_MODULE: weblate.settings_test
CI_SKIP_SAML: 1
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- run: brew update
- run: brew upgrade
continue-on-error: true
- run: brew list --versions
- run: brew deps --tree --installed
- run: brew config
- run: brew doctor
continue-on-error: true
- name: Install brew dependencies
run: |
brew install python pango cairo gobject-introspection glib libyaml pkgconf zstd lz4 xxhash libxmlsec1 librsvg uv
- name: Install test dependencies
run: |
brew install icu4c valkey postgresql
brew link --force icu4c
- name: Start services
run: |
brew services start postgresql
brew services start valkey
- name: Install Weblate
run: |
uv venv .venv
source .venv/bin/activate
uv sync --frozen --all-extras --dev --no-binary-package lxml --no-binary-package xmlsec
- name: Test with Django
run: |
# shellcheck disable=SC2155
export CI_DB_USER="$(id -nu)"
source .venv/bin/activate
pytest --junitxml=junit.xml --cov=weblate --cov-report=xml --numprocesses=auto weblate
- uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
token: ${{secrets.CODECOV_TOKEN}} # zizmor: ignore[secrets-outside-env]
flags: unittests
name: Tests macos
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }} # zizmor: ignore[secrets-outside-env]
report_type: test_results