-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
79 lines (74 loc) · 2.53 KB
/
macos.yml
File metadata and controls
79 lines (74 loc) · 2.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Copyright © Michal Čihař <michal@weblate.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
name: macOS
on:
push:
branches-ignore:
- renovate/**
- weblate
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
- 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
echo /opt/homebrew/opt/postgresql@*/bin >> "$GITHUB_PATH"
# Workaround when brew doesn't install as documented
ln -s /opt/homebrew/bin/pg_dump-* /opt/homebrew/bin/pg_dump
- 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@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
token: ${{secrets.CODECOV_TOKEN}}
flags: unittests
name: Tests macos
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
report_type: test_results