Skip to content

Commit

Permalink
Merge pull request #16 from offbyone/vendor-webassets
Browse files Browse the repository at this point in the history
Vendor webassets code
  • Loading branch information
offbyone authored Nov 3, 2024
2 parents 17faf0d + 7e32761 commit 9ad9569
Show file tree
Hide file tree
Showing 73 changed files with 11,621 additions and 158 deletions.
78 changes: 33 additions & 45 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,68 +5,62 @@ on: [push, pull_request]
env:
PYTEST_ADDOPTS: "--color=yes"

jobs:
permissions:
contents: read

jobs:
test:
name: Test - ${{ matrix.python-version }}
name: Test - Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3

- name: Install Poetry
run: pipx install poetry

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install pdm
uses: pdm-project/setup-pdm@v4
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
cache-dependency-path: "pyproject.toml"
cache: true
cache-dependency-path: ./pyproject.toml
version: "2.20.0"

- name: Install dependencies
run: |
poetry env use "${{ matrix.python-version }}"
poetry run pip install --upgrade libsass
poetry install --no-interaction
pdm install
- name: Run tests
run: poetry run invoke tests

run: pdm run invoke tests

lint:
name: Lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Validate links in Markdown files
uses: JustinBeckwith/linkinator-action@v1
with:
retry: true

- name: Install Poetry
run: pipx install poetry

- name: Set up Python
uses: actions/setup-python@v4
- name: Install pdm
uses: pdm-project/setup-pdm@v4
with:
python-version: "3.9"
cache: "poetry"
cache-dependency-path: "pyproject.toml"
python-version: "3.10"
version: "2.20.0"

- name: Install dependencies
run: |
poetry env use "3.9"
poetry install --no-interaction
pdm install
- name: Run linters
run: poetry run invoke lint --diff

run: pdm run invoke lint --diff

deploy:
name: Deploy
Expand All @@ -80,31 +74,25 @@ jobs:
id-token: write

steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }}
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install uv
uses: astral-sh/setup-uv@v3

- name: Check release
id: check_release
run: |
python -m pip install --upgrade pip
python -m pip install autopub[github]
autopub check
uvx --with 'autopub[github]' autopub check
- name: Publish
if: ${{ steps.check_release.outputs.autopub_release=='true' }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
autopub prepare
autopub commit
autopub build
autopub githubrelease
uvx --with 'autopub[github]' autopub prepare
uvx --with 'autopub[github]' autopub commit
uvx --with 'autopub[github]' autopub build
uvx --with 'autopub[github]' autopub githubrelease
- name: Upload package to PyPI
if: ${{ steps.check_release.outputs.autopub_release=='true' }}
Expand Down
1 change: 0 additions & 1 deletion .gitignore

This file was deleted.

21 changes: 6 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ci:
# See https://pre-commit.com/hooks.html for info on hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-ast
Expand All @@ -20,18 +20,9 @@ repos:
- id: forbid-new-submodules
- id: trailing-whitespace

- repo: https://github.com/psf/black
rev: 23.3.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.1
hooks:
- id: black

- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
hooks:
- id: flake8
args: [--max-line-length=88]

- repo: https://github.com/PyCQA/isort
rev: 5.11.5
hooks:
- id: isort
- id: ruff
- id: ruff-format
args: ["--check"]
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Build Status](https://img.shields.io/github/actions/workflow/status/pelican-plugins/webassets/main.yml?branch=main)](https://github.com/pelican-plugins/webassets/actions)
[![PyPI Version](https://img.shields.io/pypi/v/pelican-webassets)](https://pypi.org/project/pelican-webassets/)
[![Downloads](https://img.shields.io/pypi/dm/pelican-webassets)](https://pypi.org/project/pelican-webassets/)
![License](https://img.shields.io/pypi/l/pelican-webassets?color=blue)

This [Pelican](https://github.com/getpelican/pelican) plugin allows you to use
Expand Down
Loading

0 comments on commit 9ad9569

Please sign in to comment.