Merge pull request #7997 from dengyh/refactor/trace_improve #6530
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Flake8 and Black | |
on: | |
push: | |
branches: [ master, develop, release*, feature* ] | |
pull_request: | |
branches: [ master, develop, release*, feature* ] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install system dependencies (clang) | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y clang libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev libffi-dev | |
- name: Install pyenv | |
run: | | |
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash | |
- name: Install system dependencies (python) | |
run: | | |
export PYENV_ROOT="$HOME/.pyenv" | |
export PATH="$PYENV_ROOT/bin:$PATH" | |
eval "$(pyenv init --path)" | |
CC=clang pyenv install 3.6.12 -v | |
sudo ln -sf $PYENV_ROOT/versions/3.6.12/bin/python3.6 /usr/local/bin/python3.6 | |
python3.6 -m pip install --upgrade pip | |
python3.6 -m pip install flake8==3.9.2 black==21.12b0 | |
- name: Lint with flake8 | |
run: | | |
python3.6 -m flake8 | |
- name: Format with black | |
run: | | |
python3.6 -m black . |