[CI] Add workflow for tests for macos #1
This file contains 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: Tests (MacOS) | |
on: | |
push: | |
branches: | |
- '*' | |
jobs: | |
tests-simple: | |
name: Tests | |
strategy: | |
matrix: | |
dc: [ldc-1.39.0, ldc-1.40.0] | |
os: [macOS-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install D compiler | |
uses: dlang-community/setup-dlang@v1 | |
with: | |
compiler: ${{ matrix.dc }} | |
- name: Install system dependencies | |
uses: lyricwulf/abc@v1 | |
with: | |
linux: libzip-dev libpq-dev python3-dev | |
macos: libzip libpq python3 | |
- name: Create symlink for libpq in current dir, to avoid linking issues | |
run: | | |
ln -s /opt/homebrew/lib/postgresql@14/libpq.dylib ./ | |
- name: Run tests | |
run: dub test -b unittest-cov | |
- name: Upload coverage to codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
flags: unittests | |
name: odood-unittests | |