-
Notifications
You must be signed in to change notification settings - Fork 6
41 lines (37 loc) · 1.01 KB
/
black.yml
File metadata and controls
41 lines (37 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Code formatting
on:
pull_request:
jobs:
ubuntu:
name: Ubuntu
runs-on: ${{ matrix.os }}
strategy:
matrix:
python: [ "3.13" ]
os: [ ubuntu-24.04 ]
defaults:
run:
shell: bash
steps:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v5
with:
version: "latest"
python-version: ${{ matrix.python }}
- name: Install black
run: |
uv sync --only-group format
- name: Validate code
run: |
find fwdpy11 tests tests_with_cpp examples -name '*.py' | grep -v headers | grep -v demes-spec | xargs python -m black --check