mirror of
https://github.com/flobz/psa_car_controller.git
synced 2026-08-26 10:17:18 +00:00
add test action (#118)
* Create main.yml * Update main.yml * add files for test * Update main.yml * add init * Update main.yml * re-add pandas needed because it's needed by plotly.express & some fix * add missing file * Create main.yml
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: Unit test
|
||||
|
||||
# Controls when the action will run.
|
||||
on:
|
||||
# Triggers the workflow on push or pull request events but only for the master branch
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
# 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-latest
|
||||
|
||||
# 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: pip install -r requirements.txt -r requirements-dev.txt
|
||||
- name: test app
|
||||
env:
|
||||
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
||||
run: |
|
||||
echo Test
|
||||
coverage run -m unittest || exit 1
|
||||
coverage xml -o cobertura.xml && bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r cobertura.xml
|
||||
Reference in New Issue
Block a user