377 modular robot daemon #2248
Workflow file for this run
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 | |
on: [push, pull_request] | |
jobs: | |
list-packages: | |
runs-on: ubuntu-20.04 | |
outputs: | |
packages: ${{ steps.set-packages.outputs.packages }} | |
steps: | |
- uses: actions/checkout@v4 | |
- id: set-packages | |
run: echo packages=$(jq -R -s -c 'split("\n")[:-1]' < ./packages.txt) >> $GITHUB_OUTPUT | |
dev_install: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: install_revolve2 | |
run: ./dev_install.sh | |
student_install: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: install_revolve2 | |
run: ./student_install.sh | |
check_format: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: install_tools | |
run: pip install -r ./codetools/requirements.txt | |
- name: black | |
run: ./codetools/black/check.sh | |
- name: isort | |
run: ./codetools/isort/check.sh | |
- name: pydocstyle | |
run: ./codetools/pydocstyle/check.sh | |
- name: darglint | |
run: ./codetools/darglint/check.sh | |
- name: pyflakes | |
run: ./codetools/pyflakes/check.sh | |
- name: sort-all | |
run: | | |
./codetools/sort_all/fix.sh | |
[[ -z $(git status -s) ]] | |
git checkout -- . | |
mypy: | |
needs: list-packages | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11"] | |
package: ${{ fromJson(needs.list-packages.outputs.packages) }} | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: install_tools | |
run: pip install -r ./codetools/mypy/requirements.txt | |
- name: Install example requirements | |
run: | |
./dev_install.sh | |
pip install -r ./${{ matrix.package }}/requirements.txt | |
if: startsWith(matrix.package, 'examples/') | |
- name: Install tests requirements | |
run: | |
./dev_install.sh | |
pip install -r ./tests/requirements.txt | |
if: "matrix.package == 'tests'" | |
- name: Install package | |
run: pip install ./$(echo "${{ matrix.package }}[dev]" | sed 's#/revolve2##') | |
if: "(!startsWith(matrix.package, 'examples/') && matrix.package != 'tests')" | |
- name: run_mypy | |
run: ./codetools/mypy/check.sh ${{ matrix.package }} | |
docs: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: 3.11 | |
- name: install_revolve2 | |
run: ./dev_install.sh | |
- name: setup_graphviz | |
uses: ts-graphviz/setup-graphviz@v1 | |
- name: sphinx | |
run: make -C docs html | |
- name: deploy | |
if: ${{ github.ref == 'refs/heads/master' }} | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: docs/build/html | |
clean-exclude: .nojekyll | |
unit_tests: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
python-version: [ "3.10", "3.11" ] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: install virtual display | |
run: | | |
bash .github/workflows/install_display.sh | |
echo "DISPLAY=:0" >> $GITHUB_ENV | |
- name: install_revolve2 | |
run: ./dev_install.sh | |
- name: run pytest | |
run: pytest -v |