diff --git a/.github/workflows/poetry.yml b/.github/workflows/poetry.yml deleted file mode 100644 index 04c521f..0000000 --- a/.github/workflows/poetry.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Poetry - -on: - workflow_dispatch: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - poetry: - runs-on: ubuntu-latest - strategy: - max-parallel: 1 - matrix: - python-version: ["3.11"] - poetry-version: ["1.8.3"] - steps: - - uses: actions/checkout@v4 - - name: Install poetry - run: pipx install poetry==${{ matrix.poetry-version }} - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - cache: poetry - - name: Install dependencies - run: poetry install - - name: Lint - run: poetry run ruff check . - - name: Type check - run: poetry run mypy --install-types --non-interactive . - - name: Test - run: poetry run pytest -v -s --cov=. --cov-report=xml tests - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 7496904..d1f0725 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -16,24 +16,23 @@ jobs: max-parallel: 1 matrix: python-version: ["3.11"] + poetry-version: ["1.8.3"] steps: - uses: actions/checkout@v4 + - name: Install poetry + run: pipx install poetry==${{ matrix.poetry-version }} - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - cache: pip - - name: Lint - run: | - pip install ruff - ruff check . + cache: poetry - name: Install dependencies - run: | - pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cpu - pip install . + run: poetry install + - name: Lint + run: poetry run ruff check . + - name: Type check + run: poetry run mypy --install-types --non-interactive . - name: Test - run: | - pip install pytest pytest-cov - pytest -v -s --cov=. --cov-report=xml tests + run: poetry run pytest -v -s --cov=. --cov-report=xml tests - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4 env: