diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index dcb1948..1a361d0 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -10,7 +10,7 @@ jobs: container: python:3.10-alpine steps: - name: Checkout repository - uses: actions/checkout@v1 + uses: actions/checkout@v3 - name: Build package run: python3 setup.py bdist_wheel sdist - name: Publish package diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index 25adc78..544a25b 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -4,9 +4,9 @@ on: branches: ["*"] paths-ignore: - 'docs/**' - - 'setup.*' - - '*.md' - '*.rst' + - '.readthedocs.yaml' + - 'LICENSE' tags-ignore: ["*"] pull_request: jobs: @@ -15,30 +15,36 @@ jobs: timeout-minutes: 3 strategy: matrix: - python: ["3.7", "3.8", "3.9", "3.10"] + python: ["3.9", "3.10", "3.11"] container: image: python:${{ matrix.python }}-alpine steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - - name: Install testing dependencies - run: pip3 --no-cache-dir install -e '.[sentry]' -r requires/testing.txt + - name: Create environment + run: | + pip install hatch + hatch dep show requirements --all >requirements.txt + pip install -r requirements.txt + pip install . - - name: Run flake8 tests - run: flake8 + - name: Lint + run: | + flake8 docs sprockets examples.py tests.py + yapf -dr docs sprockets examples.py tests.py - - name: Run tests - run: coverage run + - name: Test + run: coverage run -m pytest tests.py - name: Output coverage run: coverage report && coverage xml - name: Upload Coverage - uses: codecov/codecov-action@v1.0.2 + uses: codecov/codecov-action@v3 if: github.event_name == 'push' && github.repository == 'sprockets/sprockets.http' with: token: ${{secrets.CODECOV_TOKEN}} - file: build/coverage.xml + files: coverage.xml flags: unittests fail_ci_if_error: true diff --git a/pyproject.toml b/pyproject.toml index 3592af0..78c41a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,6 +69,8 @@ source = ["sprockets"] dependencies = [ "coverage>=7.2,<8", "flake8>=6,<7", + "flake8-isort>=6.0,<7", + "flake8-pyproject>=1.2,<2", "isort>=5.12,<6", "pytest>=7.4,<8", "python-docs-theme==2023.5",