Skip to content

Commit

Permalink
try build and test on github
Browse files Browse the repository at this point in the history
  • Loading branch information
misko committed Mar 19, 2024
1 parent 973f30a commit 415d360
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 46 deletions.
34 changes: 30 additions & 4 deletions .github/workflows/docker-build-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Deploy
name: Build, Deploy and Test

on:
push:
branches:
- main # Set a branch to deploy when pushed
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
deploy:
Expand All @@ -18,4 +19,29 @@ jobs:
uses: docker/build-push-action@v5
with:
push: true
tags: csmisko/ardupilotspf:latest
tags: csmisko/ardupilotspf:latest
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install system depdendencies
run: |
sudo apt-get install -y git screen libiio-dev libiio-utils vim python3-dev uhubctl libusb-dev libusb-1.0-0-dev
- name: Install dependencies (pip)
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
python -m pytest
42 changes: 0 additions & 42 deletions .github/workflows/python-app.yml

This file was deleted.

1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ contourpy==1.1.0
cycler==0.11.0
deepdiff==6.7.1
distlib==0.3.8
docker==7.0.0
exceptiongroup==1.2.0
filelock==3.13.1
flake8==6.1.0
Expand Down

0 comments on commit 415d360

Please sign in to comment.