diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f15a7be --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: colcon build & test + +on: + push: + branches: + - main + pull_request: + branches: + - main + workflow_dispatch: + +# Cancel previously running PR jobs +concurrency: + group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' + cancel-in-progress: true + +jobs: + lint: + name: Lint sources + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Setup python + uses: actions/setup-python@v4 + with: + cache: pip + - name: Install python packages + run: pip install pre-commit + - name: Run linters + run: pre-commit run --all-files --verbose --show-diff-on-failure