File tree Expand file tree Collapse file tree 4 files changed +71
-3
lines changed
Expand file tree Collapse file tree 4 files changed +71
-3
lines changed Original file line number Diff line number Diff line change 3939 - name : Run tests
4040 run : python manage.py test --shuffle
4141
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+
4273 mypy :
4374 runs-on : ubuntu-22.04
4475
Original file line number Diff line number Diff line change 1414
1515# python files
1616* .py [cod ]
17+ dist /
1718
1819# gettext binaries
1920* .mo
Original file line number Diff line number Diff line change 9090 done
9191 '' ;
9292 } ;
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+ } ;
93111 } ) ;
94112 } ;
95113}
Original file line number Diff line number Diff line change @@ -39,13 +39,31 @@ dev = [
3939 " typeguard~=4.4.0" ,
4040]
4141
42+ [tool .uv ]
43+ no-binary-package = [
44+ " psycopg-c" ,
45+ ]
46+
4247[build-system ]
4348requires = [" hatchling" ]
4449build-backend = " hatchling.build"
4550
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" ,
4967]
5068
5169# #############################################
You can’t perform that action at this time.
0 commit comments