Skip to content

Update libs before release #58

Update libs before release

Update libs before release #58

Workflow file for this run

# 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: coverage
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
types: [opened, synchronize, reopened]
jobs:
build:
runs-on: ubuntu-latest
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v3
with:
python-version: '3.10'
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install dependencies
run: |
poetry config virtualenvs.create true --local
poetry install --no-interaction --with dev
#----------------------------------------------
# run test suite with Sonar
#----------------------------------------------
- name: Run pytest
run: |
source .venv/bin/activate
export NUMBA_DISABLE_JIT=1
coverage run -m pytest
coverage xml
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}