Skip to content

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

[pre-commit.ci] pre-commit autoupdate

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

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/[email protected]
if: ${{ github.event_name == 'pull_request' }}
with:
ref: ${{ github.head_ref }}
- uses: actions/[email protected]
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/[email protected]
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/[email protected]
- 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/*