File tree 7 files changed +293
-152
lines changed
7 files changed +293
-152
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on :
4
+ pull_request :
5
+ branches : ["main"]
6
+
7
+ push :
8
+ branches : ["master", "main"]
9
+
10
+ jobs :
11
+ check-branch :
12
+ if : ${{ github.event_name == 'pull_request' }}
13
+ runs-on : ubuntu-latest
14
+ timeout-minutes : 10
15
+ concurrency :
16
+ group : check-pr-${{ github.ref }}
17
+ cancel-in-progress : true
18
+
19
+ steps :
20
+ - uses : actions/checkout@v3
21
+ with :
22
+ fetch-depth : 0
23
+
24
+ - name : Check if the PR's branch is updated
25
+ uses :
osl-incubator/[email protected]
26
+ with :
27
+ remote_branch : origin/main
28
+ pr_sha : ${{ github.event.pull_request.head.sha }}
29
+ linter :
30
+ runs-on : ubuntu-latest
31
+
32
+ concurrency :
33
+ group : ci-linter-${{ github.ref }}
34
+ cancel-in-progress : true
35
+
36
+ defaults :
37
+ run :
38
+ shell : bash -l {0}
39
+
40
+ steps :
41
+ - name : Checkout Code Repository
42
+ uses : actions/checkout@v4
43
+
44
+ - name : Create environment variables files
45
+ run : |
46
+ envsubst < .env.tpl > .env
47
+
48
+ - uses : conda-incubator/setup-miniconda@v3
49
+ with :
50
+ miniconda-version : " latest"
51
+ environment-file : conda/dev.yaml
52
+ channels : conda-forge,nodefaults
53
+ activate-environment : pydantic-to-django-model
54
+ auto-update-conda : true
55
+ conda-solver : libmamba
56
+
57
+ - name : Install dependencies
58
+ run : |
59
+ poetry check
60
+ poetry config virtualenvs.create false
61
+ poetry install
62
+
63
+ - name : Linter
64
+ run : |
65
+ pre-commit install
66
+ pre-commit run --all-files
Original file line number Diff line number Diff line change
1
+ name : Release
2
+ on :
3
+ workflow_dispatch :
4
+ push :
5
+ branches : [ main ]
6
+ pull_request :
7
+ branches : [ main ]
8
+
9
+ jobs :
10
+ check-branch :
11
+ if : ${{ github.event_name == 'pull_request' }}
12
+ runs-on : ubuntu-latest
13
+ timeout-minutes : 10
14
+ concurrency :
15
+ group : check-pr-${{ github.ref }}
16
+ cancel-in-progress : true
17
+
18
+ defaults :
19
+ run :
20
+ shell : bash -el {0}
21
+
22
+ steps :
23
+ - name : Checkout Code Repository
24
+ uses : actions/checkout@v4
25
+
26
+ - uses : conda-incubator/setup-miniconda@v3
27
+ with :
28
+ miniconda-version : " latest" dev
29
+ environment-file : conda/release.yaml
30
+ channels : conda-forge,nodefaults
31
+ activate-environment : pydantic-to-django-model-release
32
+ auto-update-conda : true
33
+ conda-solver : libmamba
34
+
35
+ - name : Create file with environment variables
36
+ run : touch .env
37
+
38
+ - name : Install dependencies
39
+ run : poetry install
40
+
41
+ - name : Update npm
42
+ run : npm -g update npm
43
+
44
+ - name : Run semantic release (for tests)
45
+ if : ${{ github.event_name != 'workflow_dispatch' }}
46
+ env :
47
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
48
+ run : makim release.dry
49
+
50
+ - name : Release command
51
+ if : ${{ github.event_name == 'workflow_dispatch' }}
52
+ env :
53
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
54
+ PYPI_TOKEN : ${{ secrets.PYPI_TOKEN }}
55
+ run : |
56
+ makim release.ci
57
+
58
+ - name : Generate documentation with changes from semantic-release
59
+ run : makim docs.build
60
+
61
+ - name : GitHub Pages action
62
+ if : ${{ github.event_name == 'workflow_dispatch' }}
63
+
64
+ with :
65
+ github_token : ${{ secrets.GITHUB_TOKEN }}
66
+ publish_dir : ./build
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ exclude: "^docs/|/migrations/|devcontainer.json"
2
2
default_stages : [pre-commit]
3
3
4
4
default_language_version :
5
- python : python3.10
5
+ python : python3.12
6
6
7
7
repos :
8
8
- repo : https://github.com/pre-commit/pre-commit-hooks
@@ -25,14 +25,12 @@ repos:
25
25
- id : djlint-reformat-django
26
26
files : " \\ .html"
27
27
types_or : ['html']
28
- # it is necessary to exclude src/literev/templates/tags because of the
29
28
# following issue:
30
29
# - https://github.com/Riverside-Healthcare/djLint/issues/703
31
30
exclude : " .git"
32
31
- id : djlint-django
33
32
files : " \\ .html"
34
33
types_or : ['html']
35
- # it is necessary to exclude src/literev/templates/tags because of the
36
34
# following issue:
37
35
# - https://github.com/Riverside-Healthcare/djLint/issues/703
38
36
exclude : " .git"
52
50
name : ruff-linter
53
51
entry : ruff check
54
52
language : system
55
- exclude : " docs/|migrations/.*|literev/urls.py "
53
+ exclude : " docs/|migrations/.*"
56
54
pass_filenames : true
57
55
types :
58
56
- python
Original file line number Diff line number Diff line change
1
+ name : pydantic-to-django-model-release
2
+ channels :
3
+ - nodefaults
4
+ - conda-forge
5
+ dependencies :
6
+ - nodejs >=18
7
+ - python 3.12.*
8
+ - poetry >=1.5
9
+ - pip :
10
+ - makim==1.10.0
11
+ # fix issues with distlib
12
+ - paginate
13
+ # fix issues with distlib
14
+ - jsbeautifier
You can’t perform that action at this time.
0 commit comments