@@ -19,13 +19,10 @@ jobs:
1919 permissions :
2020 contents : read
2121
22- defaults :
23- run :
24- working-directory : ./backend
25-
2622 steps :
2723 - name : Checkout code
2824 uses : actions/checkout@v6
25+ - uses : extractions/setup-just@v3
2926 - name : Init rustup toolchain
3027 run : rustup show
3128 - name : setup rust build cache
@@ -41,20 +38,78 @@ jobs:
4138 # Default: empty
4239 key : ci_test_
4340 - name : Rustfmt
44- run : ./lint.sh rustfmt
41+ run : just lint-backend- rustfmt
4542 - name : Clippy
46- run : ./lint.sh clippy
43+ run : just lint-backend- clippy
4744 - name : SQLFluff
48- run : ./lint.sh sqlfluff
45+ run : just lint-backend- sqlfluff
4946 - name : Start PostgreSQL
5047 run : |
5148 service postgresql start
5249 psql postgres://geoengine:geoengine@localhost -c "CREATE DATABASE biois;"
5350 - name : Diesel Check
54- run : ./lint.sh diesel_cli --with-install
51+ run : |
52+ just install-diesel-cli
53+ just lint-backend-diesel-cli
5554 env :
5655 DATABASE_URL : postgres://geoengine:geoengine@localhost/biois
5756
57+ lint-api-client :
58+ name : Lint API Client
59+
60+ runs-on : ubuntu-24.04
61+ container : quay.io/geoengine/devcontainer:latest
62+
63+ permissions :
64+ contents : read
65+
66+ steps :
67+ - name : Checkout code
68+ uses : actions/checkout@v6
69+ - uses : extractions/setup-just@v3
70+ - name : Idempotency of OpenAPI doc generation
71+ run : |
72+ just generate-openapi-spec
73+ if [ -n "$(git status --porcelain)" ]; then
74+ echo "Error: Uncommitted changes found after OpenAPI spec generation."
75+ echo "The following files have uncommitted changes:"
76+ git status --porcelain
77+ exit 1
78+ fi
79+ - name : Idempotency of API client code generation
80+ run : |
81+ just build-api-client
82+ if [ -n "$(git status --porcelain)" ]; then
83+ echo "Error: Uncommitted changes found after code generation."
84+ echo "The following files have uncommitted changes:"
85+ git status --porcelain
86+ exit 1
87+ fi
88+ - name : Check API client for build errors
89+ run : just lint-api-client
90+
91+ lint-frontend :
92+ name : Lint Frontend
93+
94+ runs-on : ubuntu-24.04
95+ container : quay.io/geoengine/devcontainer:latest
96+
97+ permissions :
98+ contents : read
99+
100+ steps :
101+ - name : Checkout code
102+ uses : actions/checkout@v6
103+ - uses : extractions/setup-just@v3
104+ - name : Install dependencies
105+ run : |
106+ just install-api-client-deps
107+ just install-frontend-deps
108+ - name : Code Format
109+ run : just lint-frontend-fmt
110+ - name : Lints
111+ run : just lint-frontend-code
112+
58113 test-backend :
59114 name : Test Backend
60115
@@ -67,13 +122,10 @@ jobs:
67122 outputs :
68123 coverage-artifact-id : ${{ steps.upload-artifact.outputs.artifact-id }}
69124
70- defaults :
71- run :
72- working-directory : ./backend
73-
74125 steps :
75126 - name : Checkout code
76127 uses : actions/checkout@v6
128+ - uses : extractions/setup-just@v3
77129 - name : Init rustup toolchain
78130 run : rustup show
79131
@@ -95,13 +147,8 @@ jobs:
95147 key : ci_test_
96148 - name : Test
97149 run : |
98- cargo install --locked cargo-llvm-cov
99-
100- cargo llvm-cov \
101- --locked \
102- --all-features \
103- --lcov \
104- --output-path /lcov.info
150+ just install-llvm-cov
151+ just test-backend-with-coverage "/lcov.info"
105152 - id : upload-artifact
106153 uses : actions/upload-artifact@v6
107154 with :
@@ -110,6 +157,41 @@ jobs:
110157 compression-level : 9
111158 retention-days : 1
112159 if-no-files-found : error
160+
161+ test-frontend :
162+ name : Test Frontend
163+
164+ runs-on : ubuntu-24.04
165+ container : quay.io/geoengine/devcontainer:latest
166+
167+ permissions :
168+ contents : read
169+
170+ outputs :
171+ coverage-artifact-id : ${{ steps.upload-artifact.outputs.artifact-id }}
172+
173+ steps :
174+ - name : Checkout code
175+ uses : actions/checkout@v6
176+ - uses : extractions/setup-just@v3
177+ - name : Install dependencies
178+ run : |
179+ just install-api-client-deps
180+ just install-frontend-deps
181+ - name : Build
182+ run : just build-frontend
183+
184+ - name : Test
185+ run : just test-frontend
186+
187+ - id : upload-artifact
188+ uses : actions/upload-artifact@v6
189+ with :
190+ name : lcov-report-frontend-${{ github.run_id }}-${{ github.run_attempt }}
191+ path : frontend/coverage/BioIS/lcov.info
192+ compression-level : 9
193+ retention-days : 1
194+ if-no-files-found : error
113195
114196 upload-coverage :
115197 name : Upload Coverage Report
@@ -121,7 +203,7 @@ jobs:
121203
122204 needs :
123205 - test-backend
124-
206+ - test-frontend
125207 steps :
126208 - name : Checkout code
127209 uses : actions/checkout@v6
@@ -133,6 +215,11 @@ jobs:
133215 - name : Modify lcov paths
134216 run : |
135217 sed -i 's|SF:/__w/BioIS/BioIS/|SF:|' backend/lcov.info
218+ - name : Download Frontend Coverage Report
219+ uses : actions/download-artifact@v7
220+ with :
221+ artifact-ids : ${{ needs.test-frontend.outputs.coverage-artifact-id }}
222+ path : frontend/
136223 - name : Upload coverage to Coveralls
137224 uses : coverallsapp/github-action@v2
138225 with :
0 commit comments