Added Pylint rule to enforce toplevel imports. #303
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: vcs2l | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- macos-latest | |
- ubuntu-22.04 | |
- ubuntu-24.04 | |
- windows-2022 | |
- windows-2025 | |
python-version: ["3.10", "3.12"] | |
include: | |
- os: ubuntu-22.04 | |
python-version: "3.7" | |
- os: ubuntu-22.04 | |
python-version: "3.8" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies (macOS) | |
run: | | |
brew install subversion mercurial | |
if: matrix.os == 'macos-latest' | |
- name: Install dependencies (Ubuntu) | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends subversion mercurial | |
if: startsWith(matrix.os, 'ubuntu') | |
- name: Test with pytest | |
run: | | |
pip install --upgrade .[test] | |
${{ startsWith(matrix.os, 'windows') && 'set PYTHONPATH=%cd% &&' || 'PYTHONPATH=`pwd`' }} python3 -m pytest -s -v test | |
codecov: | |
needs: build | |
uses: ros-infrastructure/ci/.github/workflows/pytest.yaml@main | |
with: | |
codecov: true | |
matrix-filter: del(.matrix.os[] | select(. != "ubuntu-latest")) | del(.matrix.python[] | select(. != "3.12")) | |
secrets: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |