forked from ESCOMP/CTSM
-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (40 loc) · 1.56 KB
/
black.yml
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
40
41
name: black check on push and PR
#
# Run the python formatting in check mode
#
on: [push, pull_request]
jobs:
black-check:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7.9", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
# Checkout the code
- uses: actions/checkout@v2
# Use the latest stable version of the github action
- uses: psf/black@stable
with:
# Use options and version identical to the conda environment
# Using pyproject.toml makes sure this testing is consistent with our python directory testing
options: "--check --diff --config python/pyproject.toml"
src: "./python"
# Version should be coordinated with the ctsm_pylib conda environment under the python directory
version: "22.3.0"
# Actions identical to above for each directory and source file we need to check (arrays aren't allowed for src: field)
- uses: psf/black@stable
with:
options: "--check --diff --config python/pyproject.toml"
src: "./cime_config/SystemTests"
version: "22.3.0"
- uses: psf/black@stable
with:
options: "--check --diff --config python/pyproject.toml"
src: "./cime_config/buildlib"
version: "22.3.0"
- uses: psf/black@stable
with:
options: "--check --diff --config python/pyproject.toml"
src: "./cime_config/buildnml"
version: "22.3.0"