Skip to content

Commit

Permalink
Update dev dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
watarichanno committed Jan 3, 2025
1 parent 6884793 commit 75dc784
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 147 deletions.
42 changes: 16 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,36 @@ name: CI

on:
push:
branches: ["master", "v0.3.0"]
branches: ["master", "v*"]
pull_request:
branches: ["master", "v0.3.0"]
branches: ["master", "v*"]

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Load cached Poetry installation
uses: actions/cache@v3
with:
path: ~/.local
key: poetry-0
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
uses: abatilo/actions-poetry@v4
- name: Setup virtual environment
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- uses: actions/cache@v4
name: Define cache for the virtual environment based on dependency lock file
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Check code formatting
run: poetry run black --check nsdu/ tests/
- name: Lint
run: poetry run ruff check nsdu/ tests/
run: poetry install
- name: Lint and check formatting
run: poetry run ruff .
- name: Run tests
run: poetry run pytest
147 changes: 34 additions & 113 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 75dc784

Please sign in to comment.