Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ipa-rwu committed Dec 1, 2023
1 parent 817eaaf commit 9f2d9c0
Showing 1 changed file with 34 additions and 22 deletions.
56 changes: 34 additions & 22 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,42 @@ name: ros_model_parser
on: [push, pull_request]

jobs:
build:

test_on_ubuntu_latest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [2.7, 3.5, 3.6, 3.7, 3.8]
python-version_ubuntu-latest: [3.7, 3.8, 3.9, 3.10, 3.11]

steps:
- uses: actions/[email protected]

- name: Set up Python ${{ matrix.python-version_ubuntu-latest }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version_ubuntu-latest }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
lint:
name: pre-commit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
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: |
# pytest
- uses: actions/[email protected]

- uses: actions/[email protected]
with:
python-version: 3.x

- name: install pre-commit
run: pip install pre-commit

- name: pre-commit cache
uses: actions/[email protected]
with:
path: ~/.cache/pre-commit
key: "${{ hashFiles('.pre-commit-config.yaml') }}"

- run: pre-commit run --all-files --show-diff-on-failure

0 comments on commit 9f2d9c0

Please sign in to comment.