Skip to content

Commit

Permalink
ci: sync with template repository
Browse files Browse the repository at this point in the history
  • Loading branch information
liblaf committed Dec 1, 2023
1 parent b856fac commit 51e2ac7
Show file tree
Hide file tree
Showing 15 changed files with 478 additions and 204 deletions.
2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
layout conda mkdocs
layout micromamba
4 changes: 4 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
version: 2

updates:
- package-ecosystem: cargo
directory: /
schedule:
interval: weekly
- package-ecosystem: gitsubmodule
directory: /
schedule:
Expand Down
4 changes: 0 additions & 4 deletions .github/sync-repo-settings.yaml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Check

on:
pull_request:

jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Check
run: |
function checks() {
(gh pr checks ${{ github.event.pull_request.html_url }} || true) |
grep --invert-match ${{ github.run_id }}
}
function count() {
checks |
cut --fields=2 |
(grep --count "$@" || true)
}
while true; do
count=$(count pending)
if ((count > 0)); then
echo "Waiting for $count checks to complete..."
sleep 10
else
break
fi
done
count=$(count fail)
if ((count > 0)); then
echo "$count checks failed"
exit 1
else
echo "All checks passed"
exit 0
fi
env:
GH_TOKEN: ${{ github.token }}
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI/CD
name: CI

on:
push:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Documentation

on:
push:
branches:
- main

permissions:
contents: write
Expand All @@ -19,7 +17,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Install Fonts
run: |-
run: |
sudo apt --yes update
sudo apt --yes install fonts-noto fonts-noto-cjk
- name: Setup Python
Expand All @@ -34,5 +32,6 @@ jobs:
uses: teatimeguest/setup-texlive-action@v2
with:
packages: scheme-full
- name: Deploy to GitHub Pages
- if: github.ref == 'refs/heads/main'
name: Deploy to GitHub Pages
run: make --jobs docs-gh-deploy
22 changes: 0 additions & 22 deletions .github/workflows/license.yaml

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/merge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Merge

on:
pull_request:

permissions:
pull-requests: write

jobs:
merge:
if: |-
github.event.pull_request.user.login == 'dependabot[bot]' ||
github.event.pull_request.user.login == 'pre-commit-ci[bot]'
runs-on: ubuntu-latest
steps:
- name: Enable auto-merge
run: gh pr merge ${{ github.event.pull_request.html_url }} --auto --squash
env:
GH_TOKEN: ${{ github.token }}
26 changes: 26 additions & 0 deletions .github/workflows/template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Template Repository

on:
schedule:
- cron: 0 0 * * 0
workflow_dispatch:

permissions:
contents: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
template:
name: Template
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_PAT }}
- name: Sync with template repository
uses: liblaf/template@main
with:
push: true
181 changes: 175 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Created by https://www.toptal.com/developers/gitignore/api/latex
# Edit at https://www.toptal.com/developers/gitignore?templates=latex
# Created by https://www.toptal.com/developers/gitignore/api/latex,python
# Edit at https://www.toptal.com/developers/gitignore?templates=latex,python

### LaTeX ###
## Core latex/pdflatex auxiliary files:
Expand Down Expand Up @@ -311,8 +311,177 @@ TSWLatexianTemp*
# glossaries
*.glstex

# End of https://www.toptal.com/developers/gitignore/api/latex

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
*.pdf
site
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

### Python Patch ###
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
poetry.toml

# ruff
.ruff_cache/

# LSP config files
pyrightconfig.json

# End of https://www.toptal.com/developers/gitignore/api/latex,python

docs/demo/**/*.pdf
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

Loading

0 comments on commit 51e2ac7

Please sign in to comment.