Skip to content

[pre-commit.ci] pre-commit autoupdate #756

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #756

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
jobs:
checks:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- 3.6
- 3.7
- 3.8
- 3.9
name: Check Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2.3.4
if: ${{ github.event_name == 'pull_request' }}
with:
ref: ${{ github.head_ref }}
- uses: actions/checkout@v2.3.4
if: ${{ github.event_name == 'push' }}
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install numpy
run: python -m pip install numpy
- name: Install
run: python -m pip install -e .[test]
- name: Unit tests
run: |
pytest -v --junitxml=test-results/junit.xml --cov=src/fairlens --cov-report=xml:coverage-reports/cobertura.xml --cov-branch
sed -ie 's#/home/runner/work/fairlens/fairlens#/github/workspace#g' coverage-reports/cobertura.xml
env:
SYNTHESIZED_KEY: ${{ secrets.SYNTHESIZED_KEY }}
- name: Upload Codecov report
if: ${{ matrix.python-version == 3.7 }}
uses: codecov/codecov-action@v1.5.2
with:
files: coverage-reports/cobertura.xml
flags: unittests
fail_ci_if_error: false
- name: SonarCloud Scan
if: ${{ matrix.python-version == 3.7 }}
uses: SonarSource/sonarcloud-github-action@master
with:
projectBaseDir: .
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install
run: python -m pip install -e .[doc]
- name: Install pandoc
run: sudo apt install pandoc
- name: Build docs
run: |
cd docs
make html
- name: Upload docs artifact
uses: actions/upload-artifact@v2
with:
name: Documentation
path: docs/_build/html/*