This commit is contained in:
Florian Bezannier
2022-03-30 00:05:53 +02:00
parent 0bcf5de9d9
commit f30a0b1bcd
3 changed files with 2308 additions and 27 deletions
+2 -2
View File
@@ -2,6 +2,6 @@
parallel=True
concurrency=thread
omit =
psa-car-controller/psa/connected_car_api/*
psa_car_controller/psa/connected_car_api/*
venv/*
test/*
tests/*
+22 -25
View File
@@ -1,10 +1,5 @@
# This is a basic workflow to help you get started with Actions
name: Unit test
# Controls when the action will run.
name: test
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master, develop ]
pull_request:
@@ -13,36 +8,38 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
test:
# The type of runner that the job will run on
runs-on: ubuntu-18.04
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Runs a set of commands using the runners shell
- name: Install requirements
run: |
sudo apt-get update
sudo apt install -y software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt-get install -y python3.7
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3.7 -
export PATH="${PATH}:${HOME}/.poetry/bin/"
poetry install
- name: Set up python
id: setup-python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: check quality
run: |
export PATH="${PATH}:${HOME}/.poetry/bin/"
poetry run prospector
source .venv/bin/activate
prospector
- name: test app
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
run: |
echo Test
source {path_to_venv}/bin/activate
source .venv/bin/activate
coverage run -m unittest || exit 1
[ -n "$CODACY_PROJECT_TOKEN" ] && coverage combine && coverage xml -o cobertura.xml && bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r cobertura.xml
Generated
+2284
View File
File diff suppressed because it is too large Load Diff