Skip to content

Internal change

Internal change #16

Workflow file for this run

# Copyright 2022 Intrinsic Innovation LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: pytest
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
test-ubuntu:
name: "pytest on ${{ matrix.python-version }} on ${{ matrix.os }}"
runs-on: "${{ matrix.os }}"
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]
steps:
#----------------------------------------------
# cancel any pending actions
#----------------------------------------------
- name: Cancel previous
uses: styfle/cancel-workflow-action@0.8.0
with:
access_token: ${{ github.token }}
if: ${{github.ref != 'refs/head/main'}}
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v2
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
#----------------------------------------------
# set up Python
#----------------------------------------------
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
#----------------------------------------------
# install dependencies
#----------------------------------------------
- name: Install dependencies
run: |
pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
#----------------------------------------------
# print installed dependencies
#----------------------------------------------
- name: Print installed dependencies
run: |
pip freeze
#----------------------------------------------
# run test suite with coverage
#----------------------------------------------
- name: Test with coverage
run: |
pytest --cov=pgmax --cov-report=xml --cov-report=term-missing:skip-covered
#----------------------------------------------
# test docs build only on PR
#----------------------------------------------
- name: Test docs build
run: |
cd docs
make html SPHINXOPTS="-W"