summaryrefslogtreecommitdiff
path: root/.github/workflows/macos_unit_tests.yaml
blob: f903daa034a504892ab7bdaca7075bbc5c6e9c39 (plain) (blame)
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
name: macos tests

on:
  push:
    branches:
      - master
      - develop
  pull_request:
    branches:
      - master
      - develop
jobs:
  build:

    runs-on: macos-latest
    strategy:
      matrix:
        python-version: [3.7]

    steps:
    - uses: actions/checkout@v2
    - name: Setup Python ${{ matrix.python-version }}
      uses: actions/setup-python@v1
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install Python packages
      run: |
          pip install --upgrade pip six setuptools
          pip install --upgrade codecov coverage==4.5.4
          pip install --upgrade flake8 pep8-naming
    - name: Setup Homebrew packages
      run: |
        brew update
        brew upgrade
        brew install gcc gnupg2 dash kcov
    - name: Run unit tests
      run: |
        git --version
        git fetch origin develop:develop
        . share/spack/setup-env.sh
        coverage run $(which spack) test
        coverage combine
        coverage xml
    - name: Upload to codecov.io
      uses: codecov/codecov-action@v1
      with:
        file: ./coverage.xml
        flags: unittests,macos