From 7c7c53fbb6db8028a09b46c788d89f7efde42e42 Mon Sep 17 00:00:00 2001 From: Hugo Date: Sun, 22 Sep 2019 23:09:59 +0300 Subject: [PATCH] Test macOS with GitHub Actions --- .github/workflows/macos-install.sh | 19 +++++++++++++++++++ .github/workflows/test.yml | 16 +++++++++++++--- 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100755 .github/workflows/macos-install.sh diff --git a/.github/workflows/macos-install.sh b/.github/workflows/macos-install.sh new file mode 100755 index 000000000..473a1695e --- /dev/null +++ b/.github/workflows/macos-install.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +set -e + +sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target / + +brew install libtiff libjpeg webp little-cms2 + +PYTHONOPTIMIZE=0 pip install cffi +pip install coverage +pip install olefile +pip install -U pytest +pip install -U pytest-cov +pip install pyroma +pip install test-image-results +pip install numpy + +# extra test images +pushd depends && ./install_extra_test_images.sh && popd diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fb09b0ffa..10596655f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,9 +5,12 @@ on: [push, pull_request] jobs: build: - runs-on: ubuntu-latest strategy: matrix: + os: [ + "ubuntu-18.04", + "macOS-10.14", + ] python-version: [ "pypy3", "pypy2", @@ -21,7 +24,8 @@ jobs: env: PYTHONOPTIMIZE=2 - python-version: "3.6" env: PYTHONOPTIMIZE=1 - name: Python ${{ matrix.python-version }} + runs-on: ${{ matrix.os }} + name: ${{ matrix.os }} Python ${{ matrix.python-version }} steps: - uses: actions/checkout@v1 @@ -31,10 +35,16 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Install dependencies + - name: Install Linux dependencies + if: matrix.os == 'ubuntu-18.04' run: | .travis/install.sh + - name: Install macOS dependencies + if: matrix.os == 'macOS-10.14' + run: | + .github/workflows/macos-install.sh + - name: Test run: | .travis/script.sh