updated docs #29
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: Commit CI/CD # workflow name | |
on: # trigger | |
push: | |
branches: [main] | |
pull_request: | |
types: [opened, reopened, edited] | |
# parallel jobs to perform | |
jobs: | |
test: | |
name: Run test | |
runs-on: ubuntu-latest # runner | |
if: ${{ (!contains(github.event.head_commit.message, '#notest') && !contains(github.event.head_commit.message, '#nolinuxtest')) || github.ref == 'refs/heads/main' }} | |
steps: # tasks | |
- name: Set Github Workspace # access Github Workspace | |
uses: actions/checkout@v2 | |
- name: Set up Python 3.10 # set architecture and Python3 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
architecture: "x64" # architecture | |
- name: Build | |
shell: bash | |
run: | | |
pip install -e '.[dev]' | |
- name: Evaluate code quality | |
shell: bash | |
run: | | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=120 --statistics | |
- name: Run unittests | |
shell: bash | |
run: | | |
python -m unittest | |
- name: Print log | |
shell: bash | |
if: always() | |
run: | | |
if [ -f test.log ]; then cat test.log; fi |