rjdbcm/Aspidites

View on GitHub
.github/workflows/test.yml

Summary

Maintainability
Test Coverage
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see:https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Continuous Integration

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  issue-update:
       runs-on: ubuntu-latest
       steps:
        - uses: "actions/checkout@master"
        - name: "TODO to Issue"
          uses: "alstr/todo-to-issue-action@v4.2"
          id: "todo"

  linux-build:
      runs-on: ubuntu-latest
      strategy:
          matrix:
           python:
            - 3.10.0
            - 3.9.6
            - 3.8.12
            - 3.7.12

      steps:
      - name: Get Source Directory 
        uses: actions/checkout@v2

      - name: Test Python Versions
        uses: actions/setup-python@v2
        with:
           python-version: "${{ matrix.python }}"
      - run: |
              pip install -U pip pipenv wheel cython numpy
              pipenv lock
              pipenv sync -d
              pipenv run python setup.py build_ext --inplace
              pipenv run pytest -v -x --cov=Aspidites --cov-report=xml --profile --profile-svg
              rm -rf Pipfile.lock

      - name: Archive production artifacts
        uses: actions/upload-artifact@v2
        with:
          name: "linux-profile-python-${{ matrix.python }}"
          path: |
            prof/combined.prof

      - name: Upload Coverage to codecov.io
        uses: codecov/codecov-action@v2.1.0
        with:
          files: ./coverage.xml

#      - name: publish code coverage
#        uses: paambaati/codeclimate-action@v3
#        env:
#          CC_TEST_REPORTER_ID: 5bcc9d60bb439f75e102507e595434a393e9be017010223f6f3bc61cce2f5802


  macosx-build:
      runs-on: macos-11
      strategy:
          matrix:
           python:
            - 3.10.0
            - 3.9.6
            - 3.8.12
            - 3.7.12

      steps:
      - name: Get Source Directory 
        uses: actions/checkout@v2

      - name: Test Python Versions
        uses: actions/setup-python@v2
        with:
           python-version: "${{ matrix.python }}"
      - run: |
              pip install -U pip pipenv wheel cython numpy
              pipenv lock
              pipenv sync -d
              pipenv run python setup.py build_ext --inplace
              pipenv run pytest -v -x --profile
              rm -rf Pipfile.lock
      - name: Archive production artifacts
        uses: actions/upload-artifact@v2
        with:
            name: "macos-profile-python-${{ matrix.python }}"
            path: |
              prof/combined.prof

#  windows-build:
#        runs-on: windows-latest
#        env:
#          PYTHONIOENCODING: "utf-8"
#        steps:
#        -
#          name: Get Source Directory
#          uses: actions/checkout@v2
#        -
#          name: Build Aspidites
#          run: |
#              pip install -U pip pipenv wheel cython
#              pipenv lock
#              pipenv sync -d
#              pipenv run pytest