Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
- '*'
merge_group:

permissions:
contents: read

jobs:
Docs:
uses: tskit-dev/.github/.github/workflows/docs.yml@v17
uses: tskit-dev/.github/.github/workflows/docs.yml@v19
5 changes: 4 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Lint
on:
pull_request:

permissions:
contents: read

jobs:
Lint:
uses: tskit-dev/.github/.github/workflows/lint.yml@v17
uses: tskit-dev/.github/.github/workflows/lint.yml@v19
20 changes: 13 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,41 @@ on:
branches: [main, test]
merge_group:

permissions:
contents: read

jobs:

packaging:
name: Python packaging
uses: tskit-dev/.github/.github/workflows/python-packaging.yml@v17
uses: tskit-dev/.github/.github/workflows/python-packaging.yml@v19
with:
cli-test-cmd: tsinfer --help

test-c:
name: C tests
uses: tskit-dev/.github/.github/workflows/c-tests.yml@v17
uses: tskit-dev/.github/.github/workflows/c-tests.yml@v19
with:
library-directory: lib
secrets: inherit
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

test-python-c:
name: Python-C tests
uses: tskit-dev/.github/.github/workflows/python-c-tests.yml@v17
secrets: inherit
uses: tskit-dev/.github/.github/workflows/python-c-tests.yml@v19
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

test:
name: Python
uses: tskit-dev/.github/.github/workflows/python-tests.yml@v17
uses: tskit-dev/.github/.github/workflows/python-tests.yml@v19
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python }}
coverage-directory: tsinfer
fix-lwt-symlink: "true"
secrets: inherit
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
strategy:
matrix:
python: [ 3.11, 3.13 ]
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ on:
release:
types: [published]

permissions:
contents: read

jobs:
build-wheels:
uses: tskit-dev/.github/.github/workflows/build-wheels.yml@v17
uses: tskit-dev/.github/.github/workflows/build-wheels.yml@v19

publish:
runs-on: ubuntu-24.04
Expand All @@ -18,7 +21,7 @@ jobs:
id-token: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v7.0.0
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: build-*
path: dist
Expand All @@ -29,11 +32,11 @@ jobs:

- name: Publish to TestPyPI
if: github.event_name == 'push' && github.ref_name == 'test-publish'
uses: pypa/gh-action-pypi-publish@v1.13.0
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
with:
repository-url: https://test.pypi.org/legacy/
verbose: true

- name: Publish to PyPI
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@v1.13.0
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
9 changes: 9 additions & 0 deletions .github/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# zizmor configuration for tskit-dev repos.
# Third-party actions must be hash-pinned; first-party tskit-dev reusable
# workflows are trusted and may stay pinned to a version tag (e.g. @v17).
rules:
unpinned-uses:
config:
policies:
tskit-dev/*: ref-pin
"*": hash-pin
14 changes: 14 additions & 0 deletions prek.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ files = { glob = [
"docs/**",
"lib/*.[c,h]",
"lib/tests/*.[c,h]",
".github/workflows/**",
]}

exclude = { glob = ["lib/avl.*", "lib/subprojects/**"]}
Expand Down Expand Up @@ -65,3 +66,16 @@ hooks = [
verbose = true,
},
]

[[repos]]
repo = "local"
hooks = [
{
id = "zizmor",
name = "zizmor",
language = "system",
entry = "uv run --only-group=lint zizmor",
files = "^\\.github/workflows/.*\\.ya?ml$",
pass_filenames = true,
},
]
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ lint = [
"clang-format==21.1.8",
"ruff==0.15.1",
"prek==0.3.3",
"zizmor==1.26.1",
]

packaging = [
Expand Down
22 changes: 22 additions & 0 deletions uv.lock

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

Loading