27
27
- [core-build, core]
28
28
- [editoast, editoast-test]
29
29
- [gateway-test, gateway-standalone, gateway-front]
30
- - [front-build, front- tests, front-devel, front-nginx ]
30
+ - [front-tests]
31
31
- [osrdyne, osrdyne-test]
32
32
steps :
33
33
- name : Checkout
@@ -105,12 +105,6 @@ jobs:
105
105
echo "All retries failed, exiting."
106
106
exit 1
107
107
108
- - name : Upload front-build artifact
109
- uses : actions/upload-artifact@v4
110
- if : steps.bake-metadata.outputs.output_method == 'artifact' && contains(matrix.targets, 'front-build')
111
- with :
112
- name : front-build
113
- path : osrd-front-build.tar
114
108
- name : Upload core-build artifact
115
109
uses : actions/upload-artifact@v4
116
110
if : steps.bake-metadata.outputs.output_method == 'artifact' && contains(matrix.targets, 'core-build')
@@ -159,12 +153,6 @@ jobs:
159
153
with :
160
154
name : gateway-standalone
161
155
path : osrd-gateway-standalone.tar
162
- - name : Upload front-nginx artifact
163
- uses : actions/upload-artifact@v4
164
- if : steps.bake-metadata.outputs.output_method == 'artifact' && contains(matrix.targets, 'front-nginx')
165
- with :
166
- name : front-nginx
167
- path : osrd-front-nginx.tar
168
156
- name : Upload osrdyne artifact
169
157
uses : actions/upload-artifact@v4
170
158
if : steps.bake-metadata.outputs.output_method == 'artifact' && contains(matrix.targets, 'osrdyne')
@@ -191,6 +179,8 @@ jobs:
191
179
docker build -t test_data - <Dockerfile.empty
192
180
docker build -t static_assets - <Dockerfile.empty
193
181
docker build -t front_tests:latest - <Dockerfile.empty
182
+ docker build -t front_build:latest - <Dockerfile.empty
183
+ docker build -t front_src:latest - <Dockerfile.empty
194
184
195
185
- name : Find and check all Dockerfiles using docker build --check
196
186
run : |
@@ -468,13 +458,13 @@ jobs:
468
458
if : needs.build.outputs.output_method == 'artifact'
469
459
uses : actions/download-artifact@v4
470
460
with :
471
- name : front-build
461
+ name : front-tests
472
462
path : .
473
463
474
464
- name : Load built images
475
465
if : needs.build.outputs.output_method == 'artifact'
476
466
run : |
477
- docker load --input ./osrd-front-build .tar
467
+ docker load --input ./osrd-front-tests .tar
478
468
docker image ls -a
479
469
480
470
- name : Generate rtk bindings
@@ -483,7 +473,7 @@ jobs:
483
473
-v $PWD/editoast:/editoast
484
474
-v $PWD/gateway:/gateway
485
475
-v $PWD/front/src/common/api:/app/src/common/api
486
- ${{ fromJSON(needs.build.outputs.stable_tags).front-build }}
476
+ ${{ fromJSON(needs.build.outputs.stable_tags).front-tests }}
487
477
npm run generate-types
488
478
489
479
- name : Check for unexpected changes
@@ -679,18 +669,18 @@ jobs:
679
669
with :
680
670
name : editoast
681
671
path : .
682
- - name : Download built front-build image
672
+ - name : Download built front-tests image
683
673
if : needs.build.outputs.output_method == 'artifact'
684
674
uses : actions/download-artifact@v4
685
675
with :
686
- name : front-build
676
+ name : front-tests
687
677
path : .
688
678
689
679
- name : Load built images
690
680
if : needs.build.outputs.output_method == 'artifact'
691
681
run : |
692
682
docker load --input ./osrd-editoast.tar
693
- docker load --input ./osrd-front-build .tar
683
+ docker load --input ./osrd-front-tests .tar
694
684
695
685
- name : Generate OpenAPI
696
686
run : |
@@ -705,7 +695,7 @@ jobs:
705
695
- name : Check for i18n API errors
706
696
run : |
707
697
docker run --name=front-i18n-api-error --net=host -v $PWD/output/openapi.yaml:/editoast/openapi.yaml \
708
- ${{ fromJSON(needs.build.outputs.stable_tags).front-build }} \
698
+ ${{ fromJSON(needs.build.outputs.stable_tags).front-tests }} \
709
699
npm run i18n-api-errors
710
700
exit $(docker wait front-i18n-api-error)
711
701
@@ -849,33 +839,33 @@ jobs:
849
839
if : needs.build.outputs.output_method == 'artifact'
850
840
uses : actions/download-artifact@v4
851
841
with :
852
- name : front-build
842
+ name : front-tests
853
843
path : .
854
844
855
845
- name : Load built images
856
846
if : needs.build.outputs.output_method == 'artifact'
857
847
run : |
858
- docker load --input ./osrd-front-build .tar
848
+ docker load --input ./osrd-front-tests .tar
859
849
860
850
- name : Check code formatting
861
851
run : |
862
852
docker run --name=front-format --net=host \
863
- ${{ fromJSON(needs.build.outputs.stable_tags).front-build }} \
853
+ ${{ fromJSON(needs.build.outputs.stable_tags).front-tests }} \
864
854
npx prettier . --check
865
855
866
856
exit $(docker wait front-format)
867
857
868
858
- name : Check for i18n missing keys
869
859
run : |
870
860
docker run --name=front-i18n-checker --net=host \
871
- ${{ fromJSON(needs.build.outputs.stable_tags).front-build }} \
861
+ ${{ fromJSON(needs.build.outputs.stable_tags).front-tests }} \
872
862
npm run i18n-checker
873
863
exit $(docker wait front-i18n-checker)
874
864
875
865
- name : Execute tests within container
876
866
run : |
877
867
docker run --name=front-test --net=host -v $PWD/output:/app/tests/unit \
878
- ${{ fromJSON(needs.build.outputs.stable_tags).front-build }} \
868
+ ${{ fromJSON(needs.build.outputs.stable_tags).front-tests }} \
879
869
npm run test-coverage
880
870
881
871
exit $(docker wait front-test)
@@ -900,12 +890,6 @@ jobs:
900
890
# https://www.jameskerr.blog/posts/sharing-steps-in-github-action-workflows/
901
891
- name : Checkout
902
892
uses : actions/checkout@v4
903
- - name : Download built front-tests image
904
- if : needs.build.outputs.output_method == 'artifact'
905
- uses : actions/download-artifact@v4
906
- with :
907
- name : front-tests
908
- path : .
909
893
- name : Download built editoast image
910
894
if : needs.build.outputs.output_method == 'artifact'
911
895
uses : actions/download-artifact@v4
@@ -918,18 +902,6 @@ jobs:
918
902
with :
919
903
name : core
920
904
path : .
921
- - name : Download built gateway-standalone image
922
- if : needs.build.outputs.output_method == 'artifact'
923
- uses : actions/download-artifact@v4
924
- with :
925
- name : gateway-standalone
926
- path : .
927
- - name : Download built front-nginx image
928
- if : needs.build.outputs.output_method == 'artifact'
929
- uses : actions/download-artifact@v4
930
- with :
931
- name : front-nginx
932
- path : .
933
905
- name : Download built osrdyne image
934
906
if : needs.build.outputs.output_method == 'artifact'
935
907
uses : actions/download-artifact@v4
@@ -939,11 +911,8 @@ jobs:
939
911
- name : Load built images
940
912
if : needs.build.outputs.output_method == 'artifact'
941
913
run : |
942
- docker load --input ./osrd-front-tests.tar
943
914
docker load --input ./osrd-editoast.tar
944
915
docker load --input ./osrd-core.tar
945
- docker load --input ./osrd-gateway-standalone.tar
946
- docker load --input ./osrd-front-nginx.tar
947
916
docker load --input ./osrd-osrdyne.tar
948
917
- name : Install poetry
949
918
run : pipx install 'poetry<2.0'
@@ -961,14 +930,13 @@ jobs:
961
930
id : start_integration_worker
962
931
run : |
963
932
set -e
964
- export OSRD_FRONT_MODE=nginx
965
933
export TAG='${{ needs.build.outputs.stable_version }}'
966
934
967
935
# Inside /docker/osrdyne.yml, replace core_image "osrd-core:dev" with "osrd-core:$TAG"
968
936
# to match the version of the core image we just built inside osrdyne
969
937
sed -i "s/osrd-core:dev/osrd-core:$TAG/" docker/osrdyne.yml
970
938
971
- services='editoast osrdyne front core gateway '
939
+ services='editoast osrdyne core'
972
940
composes='-f docker-compose.yml'
973
941
docker compose $composes pull --policy missing $services
974
942
docker compose $composes up --no-build -d $services jaeger
@@ -1029,17 +997,11 @@ jobs:
1029
997
with :
1030
998
name : core
1031
999
path : .
1032
- - name : Download built gateway-standalone image
1033
- if : needs.build.outputs.output_method == 'artifact'
1034
- uses : actions/download-artifact@v4
1035
- with :
1036
- name : gateway-standalone
1037
- path : .
1038
- - name : Download built front-nginx image
1000
+ - name : Download built gateway-front image
1039
1001
if : needs.build.outputs.output_method == 'artifact'
1040
1002
uses : actions/download-artifact@v4
1041
1003
with :
1042
- name : front-nginx
1004
+ name : gateway-front
1043
1005
path : .
1044
1006
- name : Download built osrdyne image
1045
1007
if : needs.build.outputs.output_method == 'artifact'
@@ -1053,8 +1015,7 @@ jobs:
1053
1015
docker load --input ./osrd-front-tests.tar
1054
1016
docker load --input ./osrd-editoast.tar
1055
1017
docker load --input ./osrd-core.tar
1056
- docker load --input ./osrd-gateway-standalone.tar
1057
- docker load --input ./osrd-front-nginx.tar
1018
+ docker load --input ./osrd-gateway-front.tar
1058
1019
docker load --input ./osrd-osrdyne.tar
1059
1020
1060
1021
- name : Detect Playwright version
@@ -1079,14 +1040,14 @@ jobs:
1079
1040
id : start_playwright_worker
1080
1041
run : |
1081
1042
set -e
1082
- export OSRD_FRONT_MODE=nginx
1083
1043
export TAG='${{ needs.build.outputs.stable_version }}'
1044
+ export GATEWAY_FLAVOR='front'
1084
1045
1085
1046
# Inside /docker/osrdyne.yml, replace core_image "osrd-core:dev" with "osrd-core:$TAG"
1086
1047
# to match the version of the core image we just built inside osrdyne
1087
1048
sed -i "s/osrd-core:dev/osrd-core:$TAG/" docker/osrdyne.yml
1088
1049
1089
- services='editoast osrdyne front core gateway'
1050
+ services='editoast osrdyne core gateway'
1090
1051
composes='-f docker-compose.yml'
1091
1052
docker compose $composes pull --policy missing $services
1092
1053
docker compose $composes up --no-build -d $services jaeger
0 commit comments