Commit aee0cda 1 parent 5404511 commit aee0cda Copy full SHA for aee0cda
File tree 4 files changed +71
-3
lines changed
4 files changed +71
-3
lines changed Original file line number Diff line number Diff line change 39
39
- name : Run tests
40
40
run : python manage.py test --shuffle
41
41
42
+ build_wheel :
43
+ name : Build wheel
44
+ runs-on : ubuntu-22.04
45
+ steps :
46
+ - uses : actions/checkout@v4
47
+ with :
48
+ submodules : true
49
+ - uses : DeterminateSystems/nix-installer-action@main
50
+ - run : nix run .#build-dist
51
+ - run : tar tvf dist/*.tar.gz
52
+ - run : unzip -l dist/*.whl
53
+ - uses : actions/upload-artifact@v4
54
+ with :
55
+ name : wheel
56
+ path : dist/
57
+
58
+ install_wheel :
59
+ name : Install wheel with system Python
60
+ needs : build_wheel
61
+ runs-on : ubuntu-22.04
62
+ steps :
63
+ - uses : actions/setup-python@v5
64
+ with :
65
+ python-version : ' 3.10'
66
+ - uses : actions/download-artifact@v4
67
+ with :
68
+ name : wheel
69
+ - run : pip install *.whl
70
+ - name : Check that "evaluation" section appears in help string
71
+ run : python -m evap --help | grep --fixed-strings "[evaluation]"
72
+
42
73
mypy :
43
74
runs-on : ubuntu-22.04
44
75
Original file line number Diff line number Diff line change 14
14
15
15
# python files
16
16
* .py [cod ]
17
+ dist /
17
18
18
19
# gettext binaries
19
20
* .mo
Original file line number Diff line number Diff line change 90
90
done
91
91
'' ;
92
92
} ;
93
+
94
+ build-dist = pkgs . writeShellApplication {
95
+ name = "build-dist" ;
96
+ runtimeInputs = with pkgs ; [ nodejs gettext git ] ;
97
+ text =
98
+ let
99
+ python-dev = self . devShells . ${ system } . evap-dev . passthru . venv ;
100
+ python-build = self . packages . ${ system } . python3 . withPackages ( ps : [ ps . build ] ) ;
101
+ in
102
+ ''
103
+ set -x
104
+ npm ci
105
+ ${ python-dev } /bin/python ./manage.py compilemessages
106
+ ${ python-dev } /bin/python ./manage.py scss --production
107
+ ${ python-dev } /bin/python ./manage.py ts compile --fresh
108
+ ${ python-build } /bin/python -m build
109
+ '' ;
110
+ } ;
93
111
} ) ;
94
112
} ;
95
113
}
Original file line number Diff line number Diff line change @@ -39,13 +39,31 @@ dev = [
39
39
" typeguard~=4.4.0" ,
40
40
]
41
41
42
+ [tool .uv ]
43
+ no-binary-package = [
44
+ " psycopg-c" ,
45
+ ]
46
+
42
47
[build-system ]
43
48
requires = [" hatchling" ]
44
49
build-backend = " hatchling.build"
45
50
46
- [tool .uv ]
47
- no-binary-package = [
48
- " psycopg-c" ,
51
+ [tool .hatch .build ]
52
+ skip-excluded-dirs = false # otherwise, the artifacts below will be skipped
53
+ exclude = [
54
+ " evap/static/bootstrap" ,
55
+ " evap/static/font-awesome" ,
56
+ ]
57
+ artifacts = [
58
+ " evap/static/css/evap.css" ,
59
+ " evap/static/css/evap.css.map" ,
60
+ " evap/static/js/*.js" ,
61
+ " evap/static/js/*.map" ,
62
+ " evap/static/bootstrap/dist/js/bootstrap.bundle.min.js" ,
63
+ " evap/static/bootstrap/dist/js/bootstrap.bundle.min.js.map" ,
64
+ " evap/static/font-awesome/webfonts/" ,
65
+
66
+ " evap/locale/*.mo" ,
49
67
]
50
68
51
69
# #############################################
You can’t perform that action at this time.
0 commit comments