Test macOS with GitHub Actions

This commit is contained in:
Hugo 2019-09-22 23:09:59 +03:00
parent e595ddbaa1
commit 7c7c53fbb6
2 changed files with 32 additions and 3 deletions

19
.github/workflows/macos-install.sh vendored Executable file
View File

@ -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

View File

@ -5,9 +5,12 @@ on: [push, pull_request]
jobs: jobs:
build: build:
runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
os: [
"ubuntu-18.04",
"macOS-10.14",
]
python-version: [ python-version: [
"pypy3", "pypy3",
"pypy2", "pypy2",
@ -21,7 +24,8 @@ jobs:
env: PYTHONOPTIMIZE=2 env: PYTHONOPTIMIZE=2
- python-version: "3.6" - python-version: "3.6"
env: PYTHONOPTIMIZE=1 env: PYTHONOPTIMIZE=1
name: Python ${{ matrix.python-version }} runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
@ -31,10 +35,16 @@ jobs:
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Install dependencies - name: Install Linux dependencies
if: matrix.os == 'ubuntu-18.04'
run: | run: |
.travis/install.sh .travis/install.sh
- name: Install macOS dependencies
if: matrix.os == 'macOS-10.14'
run: |
.github/workflows/macos-install.sh
- name: Test - name: Test
run: | run: |
.travis/script.sh .travis/script.sh