bump: bumping version 1.0.0 #30
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: "Running tests: style, pytests and entry-points" | |
on: | |
push: | |
branches: [ "main", "test"] | |
pull_request: | |
branches: [ "main", "test"] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install flake8 pytest black isort mypy | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Install gt4sd-trainer-lm from source | |
run: | | |
pip install . | |
- name: Check black | |
run: | | |
python -m black src/gt4sd_trainer --check --diff --color | |
- name: Check isort | |
run: | | |
python -m isort src/gt4sd_trainer --check-only | |
- name: Check flake8 | |
run: | | |
python -m flake8 --disable-noqa --per-file-ignores="__init__.py:F401" src/gt4sd_trainer | |
- name: Check mypy | |
run: | | |
python -m mypy src/gt4sd_trainer | |
- name: Run pytests | |
run: | | |
python -m pytest -sv | |
- name: Test entry-points | |
run: | | |
gt4sd-trainer-hf-pl --help | |
gt4sd-pl-to-hf --help |