Refactor annotation creation and removal logic in MatplotlibViewerCanvas #213
This file contains 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: python Workflow | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
check-style: | |
name: Find Trailing Whitespace | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Find Trailing Whitespace | |
run: | | |
set +e | |
lines=$(git grep --cached -In '[[:blank:]]$') | |
if [ ! -z "$lines" ]; then | |
echo -e "\n The following lines contain trailing whitespace: \n" | |
echo -e "${lines}" | |
echo -e "\nFailed.\n" | |
exit 1 | |
fi | |
exit 0 | |
build: | |
name: Generate python files from ui | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2.4.0 | |
- name: Remove broken apt repos [Ubuntu] | |
run: | | |
for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done | |
- name: Dependencies [Ubuntu] | |
run: | | |
sudo apt update | |
sudo apt install -y pyqt5-dev-tools | |
- name: Generate python files | |
run: | | |
bash ./generate-ui.sh | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: autogenerated_files | |
path: robot_log_visualizer/ui/autogenerated | |
deploy: | |
runs-on: ubuntu-20.04 | |
needs: [build] | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/checkout@v2.4.0 | |
- name: Download artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
name: autogenerated_files | |
path: robot_log_visualizer/ui/autogenerated | |
- name: Deploy | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: ⚙️ Automatic update of the python UI classes |