Adding feature name #927
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: "CI jobs" | |
# This section controls when this action set will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the | |
# master branch and others. | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
- release* | |
defaults: | |
run: | |
shell: bash | |
# A workflow run is made of one or more jobs that can run sequentially or in | |
# parallel. | |
# NOTE: GitHub actions does nto support anchors. Forgive duplication of job | |
# fields, parameters and steps. | |
jobs: | |
docker-image-build-test: | |
runs-on: ubuntu-20.04 | |
steps: | |
# Check out repository under $GITHUB_WORKSPACE so our job can access it. | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
# Use scripting to perform a build for the current state of this branch. | |
- name: Build image | |
run: ./angel-docker-build.sh | |
# Make sure workspace builds with this environment | |
- name: Build Workspace | |
run: ./angel-workspace-shell.sh -s workspace-shell-dev ./workspace_build.sh | |
code-style-py: | |
runs-on: ubuntu-20.04 | |
steps: | |
# Check out repository under $GITHUB_WORKSPACE so our job can access it. | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
# TODO: Make use of build docker image somehow below this point | |
# setup-python with poetry requires poetry to already be installed | |
- run: | | |
echo "${HOME}/.local/bin" >> $GITHUB_PATH | |
pip install --user -U poetry | |
# Setup python version and caching | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8.10' # matching python version in container env. | |
cache: 'poetry' | |
# Install standard packages | |
- run: | | |
sudo apt install -y libasound2-dev # for python simpleaudio | |
poetry install | |
# Run black | |
- name: Lint python code | |
run: | | |
poetry run black --version | |
poetry run black --check --diff --color . | |
# type-checking: | |
# runs-on: ubuntu-20.04 | |
# continue-on-error: true | |
# steps: | |
# # Check out repository under $GITHUB_WORKSPACE so our job can access it. | |
# - uses: actions/checkout@v4 | |
# with: | |
# submodules: recursive | |
# # TODO: Make use of build docker image somehow below this point | |
# # setup-python with poetry requires poetry to already be installed | |
# - run: | | |
# echo "${HOME}/.local/bin" >> $GITHUB_PATH | |
# pip install --user -U poetry | |
# # Setup python version and caching | |
# - uses: actions/setup-python@v4 | |
# with: | |
# python-version: '3.8.10' # matching python version in container env. | |
# cache: 'poetry' | |
# # Install standard packages | |
# - run: | | |
# sudo apt install -y libasound2-dev # for python simpleaudio | |
# poetry install | |
# # Run mypy to check types | |
# - run: poetry run mypy | |
pytest-angel-system: | |
runs-on: ubuntu-20.04 | |
steps: | |
# Check out repository under $GITHUB_WORKSPACE so our job can access it. | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
# TODO: Make use of build docker image somehow below this point | |
# setup-python with poetry requires poetry to already be installed | |
- run: | | |
echo "${HOME}/.local/bin" >> $GITHUB_PATH | |
pip install --user -U poetry | |
# Setup python version and caching | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8.10' # matching python version in container env. | |
cache: 'poetry' | |
# Install standard packages | |
- run: | | |
sudo apt install -y libasound2-dev # for python simpleaudio | |
poetry install | |
# Run top-level unit-tests (outside of ROS) | |
- run: poetry run pytest |