Skip to content

Commit

Permalink
feat(ci): run tests on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Feb 26, 2025
1 parent cd7730d commit c9e33d9
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,14 @@ jobs:
env:
PYTHONUNBUFFERED: 1
PYTHONWARNINGS: default,ignore:unclosed:ResourceWarning
CI_DATABASE: postgresql
CI_REDIS_HOST: localhost
CI_DB_HOST: localhost
CI_SELENIUM: '1'
DJANGO_SETTINGS_MODULE: weblate.settings_test
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: astral-sh/[email protected]
- run: brew update
- run: brew upgrade
- run: brew list --versions
Expand All @@ -33,9 +39,35 @@ jobs:
continue-on-error: true
- name: Install brew dependencies
run: |
brew install pango cairo gobject-introspection glib libyaml pkgconf zstd xxhash libxmlsec1 uv
brew install pango cairo gobject-introspection glib libyaml pkgconf zstd xxhash libxmlsec1
- name: Install test dependencies
run: |
brew install mysql icu4c redis postgresql
brew link --force icu4c
- name: Start services
run: |
brew services start postgresql
brew services start redis
- name: Install Weblate
run: |
uv venv --python python3.12 .venv
source .venv/bin/activate
uv pip install -e ".[all]"
- name: Test with Django
run: |
export LDFLAGS="${LDFLAGS} -L/usr/local/opt/icu4c/lib"
export CPPFLAGS="${CPPFLAGS} -I/usr/local/opt/icu4c/include"
export PKG_CONFIG_PATH=/usr/local/opt/icu4c/lib/pkgconfig:"$PKG_CONFIG_PATH"
export CI_DB_USER="$(id -nu)"
source .venv/bin/activate
uv run --no-sources --all-extras pytest --junitxml=junit.xml --cov=weblate --numprocesses=auto weblate
- uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5
with:
token: ${{secrets.CODECOV_TOKEN}}
flags: unittests
name: Tests macos
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@5c441a7bcc06f8706cde90192857d337c5dab8a6 # v1
with:
token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit c9e33d9

Please sign in to comment.