Skip to content

Commit 15f7eab

Browse files
authored
CI Cleanup (#126)
* add PHONY targets, make CI run with `bash` and exit on error --------- Signed-off-by: Jack Luar <[email protected]>
1 parent 918b996 commit 15f7eab

File tree

7 files changed

+37
-10
lines changed

7 files changed

+37
-10
lines changed

.github/workflows/ci-secret.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
- 'Makefile'
1313
- 'docker-compose.yml'
1414

15+
defaults:
16+
run:
17+
shell: bash
18+
1519
jobs:
1620
build-backend-docker:
1721
runs-on: self-hosted
@@ -23,7 +27,8 @@ jobs:
2327
- name: Checkout code
2428
uses: actions/checkout@v4
2529
- name: Setup prereqs
26-
run: make init-dev
30+
run: |
31+
make init-dev
2732
- name: Run formatting checks
2833
run: |
2934
make check

.github/workflows/ci.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
- 'Makefile'
1111
- 'docker-compose.yml'
1212

13+
defaults:
14+
run:
15+
shell: bash
16+
1317
jobs:
1418
build-backend-docker:
1519
runs-on: self-hosted
@@ -21,7 +25,8 @@ jobs:
2125
- name: Checkout code
2226
uses: actions/checkout@v4
2327
- name: Setup prereqs
24-
run: make init-dev
28+
run: |
29+
make init-dev
2530
- name: Run formatting checks
2631
run: |
2732
make check

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
1-
.PHONY: init init-dev format check
2-
31
FOLDERS=backend frontend evaluation
42

3+
.PHONY: init
54
init:
65
@for folder in $(FOLDERS); do (cd $$folder && make init && cd ../); done
76

7+
.PHONY: init-dev
88
init-dev:
99
@for folder in $(FOLDERS); do (cd $$folder && make init-dev && cd ../); done
1010

11+
.PHONY: format
1112
format:
1213
@for folder in $(FOLDERS); do (cd $$folder && make format && cd ../); done
1314

15+
.PHONY: check
1416
check:
1517
@for folder in $(FOLDERS); do (cd $$folder && make check && cd ../); done
1618
@. ./backend/.venv/bin/activate && \
1719
pre-commit run --all-files
1820

21+
.PHONY: docker-up
1922
docker-up:
2023
@docker compose up --build --wait
2124

25+
.PHONY: docker-down
2226
docker-down:
2327
@docker compose down --remove-orphans
2428

29+
.PHONY: changelog
2530
changelog:
2631
@git log --pretty=format:"%h%x09%an%x09%ad%x09%s" --date=short --since="2024-06-01" > CHANGELOG.md
2732
@cd .github/workflows && python changelog_report.py

backend/.env.example

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ GOOGLE_EMBEDDINGS="text-embedding-004"
2222
HF_EMBEDDINGS="thenlper/gte-large"
2323
HF_RERANKER="BAAI/bge-reranker-base"
2424

25-
LANGCHAIN_TRACING_V2=
26-
LANGCHAIN_ENDPOINT=
27-
LANGCHAIN_API_KEY=
28-
LANGCHAIN_PROJECT=
25+
LANGSMITH_TRACING=true
26+
LANGSMITH_ENDPOINT="https://api.smith.langchain.com"
27+
LANGSMITH_API_KEY=
28+
LANGSMITH_PROJECT=
2929

3030
HF_TOKEN=
3131

backend/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1+
.PHONY: init
12
init:
23
@python3 -m venv .venv && \
34
. .venv/bin/activate && \
45
pip install -r requirements.txt && \
56
pip install -e .
67

8+
.PHONY: init-dev
79
init-dev: init
810
@. .venv/bin/activate && \
911
pip install -r requirements-test.txt
1012

13+
.PHONY: format
1114
format:
1215
@. .venv/bin/activate && \
1316
ruff format
1417

18+
.PHONY: check
1519
check:
1620
@. .venv/bin/activate && \
1721
mypy . && \

evaluation/Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,32 @@
1-
.PHONY: init init-dev format check clean
2-
1+
.PHONY: init
32
init:
43
@python3 -m venv .venv && \
54
. .venv/bin/activate && \
65
pip install -r requirements.txt && \
76
pip install -e .
87

8+
.PHONY: init-dev
99
init-dev: init
1010
@. .venv/bin/activate && \
1111
pip install -r requirements-test.txt
1212

13+
.PHONY: format
1314
format:
1415
@. .venv/bin/activate && \
1516
ruff format
1617

18+
.PHONY: check
1719
check:
1820
@. .venv/bin/activate && \
1921
mypy . && \
2022
ruff check
2123

24+
.PHONY: clean
2225
clean:
2326
@rm -f llm_tests_output.txt
2427
@rm -f **/.deepeval-cache.json
2528

29+
.PHONY: llm-tests
2630
llm-tests: clean
2731
@. .venv/bin/activate && \
2832
cd auto_evaluation && \

frontend/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
1+
.PHONY: init
12
init:
23
@python3 -m venv .venv && \
34
. .venv/bin/activate && \
45
pip install -r requirements.txt
56

7+
.PHONY: init-dev
68
init-dev: init
79
@. .venv/bin/activate && \
810
pip install -r requirements-test.txt
911

12+
.PHONY: format
1013
format:
1114
@. .venv/bin/activate && \
1215
ruff format
1316

17+
.PHONY: check
1418
check:
1519
@. .venv/bin/activate && \
1620
mypy . && \

0 commit comments

Comments
 (0)