Update makefile (#2) #22
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 | |
# --------------------------------------------------------------------------- | |
# __author__ = 'Satoshi Imai' | |
# __credits__ = ['Satoshi Imai'] | |
# __version__ = '0.9.0' | |
# --------------------------------------------------------------------------- | |
on: [push, pull_request] | |
env: | |
# overwritten from ci_environments.txt | |
flake8_ignore: | |
max_complexity: 15 | |
max_line_length: 127 | |
jobs: | |
test: | |
strategy: | |
matrix: | |
python: ['3.9', '3.10', '3.11'] | |
platform: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install Requirements | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade tox | |
- name: Test | |
run: python -m tox -e py | |
flake8: | |
name: flake8 check | |
strategy: | |
matrix: | |
python: ['3.11'] | |
platform: [ubuntu-latest] | |
runs-on: ${{ matrix.platform }} | |
needs: | |
- test | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install Requirements | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade tox | |
pip install -r dev_requirements.txt | |
pip install -r requirements.txt | |
- name: Assign veriables to Env variable | |
run: | | |
cat ci_environments.txt >> $GITHUB_ENV | |
- name: Lint with flake8 | |
run: | | |
flake8 --ignore=${{ env.flake8_ignore }} --max-complexity=${{ env.max_complexity }} --max-line-length=${{ env.max_line_length }} --exclude=.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg,nowcast --output-file=flake8.txt . | |
- name: flake8 report | |
uses: actions/upload-artifact@v3 | |
with: | |
name: code-flake8 | |
path: flake8.txt |