Icml push #303
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: code-check | |
on: | |
push: | |
branches: ["main"] | |
tags: ["*"] | |
pull_request: | |
branches: | |
- "*" | |
- "!gh-pages" | |
jobs: | |
python-format-black: | |
name: Python lint [black] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install black | |
run: | | |
pip install black>=24 | |
- name: Lint | |
run: black --check . | |
python-typing-mypy: | |
name: Python typing check [mypy] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install mypy | |
run: | | |
pip install mypy numpy pandas loguru pytest pillow scipy | |
- name: Run code check | |
run: | | |
mypy . || exitCode=$? | |
# only fails if exit code >=2 | |
if [ $exitCode -ge 2 ]; then | |
exit $exitCode | |
fi |