Update base image to python v3.10 #467
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: "code checks" | |
on: push | |
jobs: | |
code-checks: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: init venv | |
run: .devcontainer/bin/init_venv.sh | |
- name: check Python imports | |
run: > | |
.venv/bin/isort . --check --diff | |
--skip .venv | |
--skip .mnist-keras | |
--skip .mnist-pytorch | |
--skip fedn_pb2.py | |
--skip fedn_pb2_grpc.py | |
- name: check Python formatting | |
run: > | |
.venv/bin/autopep8 --recursive --diff | |
--exclude .venv | |
--exclude .mnist-keras | |
--exclude .mnist-pytorch | |
--exclude fedn_pb2.py | |
--exclude fedn_pb2_grpc.py | |
. | |
- name: run Python linter | |
run: > | |
.venv/bin/flake8 . | |
--exclude ".venv,.mnist-keras,.mnist-pytorch,fedn_pb2.py,fedn_pb2_grpc.py" | |
- name: check for floating imports | |
run: > | |
! grep -E -R | |
--exclude-dir='.venv' | |
--exclude-dir='.mnist-pytorch' | |
--exclude-dir='.mnist-keras' | |
--exclude-dir='docs' | |
--exclude='tests.py' | |
'^[ \t]+(import|from) ' -I . | |
# TODO: add linting/formatting for all file types |