diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 11:33:32 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 11:33:32 +0000 |
commit | 1f403ad2197fc7442409f434ee574f3e6b46fb73 (patch) | |
tree | 0299c6dd11d5edfa918a29b6456bc1875f1d288c /.github | |
parent | Initial commit. (diff) | |
download | pygments-upstream.tar.xz pygments-upstream.zip |
Adding upstream version 2.14.0+dfsg.upstream/2.14.0+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/build.yaml | 72 | ||||
-rw-r--r-- | .github/workflows/docs.yaml | 40 |
2 files changed, 112 insertions, 0 deletions
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..2d26dfb --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,72 @@ +name: Pygments + +on: [push, pull_request] + +permissions: + contents: read # to fetch code (actions/checkout) + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] + exclude: + - os: ubuntu-latest + python-version: "3.6" + include: + - os: ubuntu-20.04 + python-version: "3.6" + max-parallel: 4 + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + - name: Install package + run: | + pip install -r requirements.txt + pip install . + - name: Test package + run: pytest -W error + + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + - name: Run make check + run: make check + - name: Fail if the basic checks failed + run: make check + if: runner.os == 'Linux' + + check-mapfiles: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + - name: Regenerate mapfiles + run: make mapfiles + - name: Fail if mapfiles changed + run: | + if git ls-files -m | grep mapping; then + echo 'Please run "make mapfiles" and add the changes to a commit.' + exit 1 + fi + + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: 3.8 + - name: Check out regexlint + run: git clone https://github.com/pygments/regexlint + - name: Run regexlint + run: make regexlint REGEXLINT=`pwd`/regexlint diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 0000000..41adf4e --- /dev/null +++ b/.github/workflows/docs.yaml @@ -0,0 +1,40 @@ +name: Docs + +on: + push: + branches: + - master + +permissions: {} +jobs: + build: + permissions: + contents: write # to push pages branch (peaceiris/actions-gh-pages) + + runs-on: ubuntu-latest + steps: + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: "3.10" + - name: Checkout Pygments + uses: actions/checkout@v2 + - name: Install Sphinx & WCAG contrast ratio + run: pip install Sphinx wcag-contrast-ratio + - name: Create Pyodide WASM package + run: cd doc && make pyodide + - name: Sphinx build + run: | + cd doc + WEBSITE_BUILD=1 make dirhtml + touch _build/dirhtml/.nojekyll + echo -e 'pygments.org\nwww.pygments.org' > _build/dirhtml/CNAME + echo 'Automated deployment of docs for GitHub pages.' > _build/dirhtml/README + - name: Deploy to repo + if: github.repository_owner == 'pygments' + uses: peaceiris/actions-gh-pages@v3 + with: + deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} + external_repository: pygments/pygments.github.io + publish_branch: master + publish_dir: ./doc/_build/dirhtml |