Lint and Test #16
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: Lint and Test | |
# Triggered by other workflows or on any push on branches | |
on: | |
push: | |
branches: | |
- "**" | |
workflow_call: | |
schedule: | |
- cron: '45 14 10 * *' # Program linting every 10th of each month at 14:45 | |
jobs: | |
main: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- name: Set git to use LF | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.eol lf | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements-dev.txt | |
- name: pylint | |
run: | | |
pylint torch_tps | |
- name: mypy | |
run: | | |
mypy torch_tps | |
- name: black | |
run: | | |
black --check . | |
# TODO | |
# - name: pytest | |
# run: | | |
# pytest |