initial commit
This commit is contained in:
commit
9ce178e7cf
33
.github/workflows/ci-python.yml
vendored
Normal file
33
.github/workflows/ci-python.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
name: Python CI
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
|
# env:
|
||||||
|
# REPO_NAME:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ci:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Setup Python
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: "3.11"
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pip install -r requirements.txt && pip install -r requirements-dev.txt
|
||||||
|
- name: Lint
|
||||||
|
run: pylint --recursive=yes --output-format=parseable --output=lintreport.txt . || pylint-exit $?
|
||||||
|
- name: Unit Test
|
||||||
|
run: |
|
||||||
|
coverage run -m py.test -v --junitxml=testresults.xml
|
||||||
|
coverage xml
|
||||||
|
# sed -i 's/\/home\/runner\/work\/pypilot\/pypilot/\/github\/workspace/g' 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_CLOUD }}
|
10
.github/workflows/test.yml
vendored
Normal file
10
.github/workflows/test.yml
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
name: Test
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Print workspace
|
||||||
|
run: echo ${{ github.workspace }}
|
Loading…
Reference in New Issue
Block a user