Skip to content

Commit 3d61515

Browse files
AchoArnoldCopilot
andcommitted
refactor: move tests directory inside api
The integration tests are API-specific, so they belong under api/tests. Update workflow paths and docker-compose context accordingly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 9235572 commit 3d61515

13 files changed

Lines changed: 10 additions & 10 deletions

File tree

.github/workflows/api.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ jobs:
2626

2727
- name: Generate Firebase credentials
2828
run: |
29-
bash tests/generate-firebase-credentials.sh tests/firebase-credentials.json
30-
echo "FIREBASE_CREDENTIALS=$(jq -c . tests/firebase-credentials.json)" >> $GITHUB_ENV
29+
bash api/tests/generate-firebase-credentials.sh api/tests/firebase-credentials.json
30+
echo "FIREBASE_CREDENTIALS=$(jq -c . api/tests/firebase-credentials.json)" >> $GITHUB_ENV
3131
3232
- name: Start Services
33-
working-directory: ./tests
33+
working-directory: ./api/tests
3434
run: docker compose up -d --build
3535

3636
- name: Wait for services to be healthy
37-
working-directory: ./tests
37+
working-directory: ./api/tests
3838
run: |
3939
echo "Waiting for API to be healthy..."
4040
for i in $(seq 1 40); do
@@ -52,25 +52,25 @@ jobs:
5252
done
5353
5454
- name: Seed Database
55-
working-directory: ./tests
55+
working-directory: ./api/tests
5656
run: |
5757
echo "Waiting for seed container to finish..."
5858
docker compose wait seed || true
5959
sleep 2
6060
6161
- name: Run Integration Tests
62-
working-directory: ./tests
62+
working-directory: ./api/tests
6363
run: go test -v -timeout 300s ./...
6464

6565
- name: Collect Logs on Failure
6666
if: failure()
67-
working-directory: ./tests
67+
working-directory: ./api/tests
6868
run: |
6969
docker compose logs --tail 200
7070
7171
- name: Stop Services
7272
if: always()
73-
working-directory: ./tests
73+
working-directory: ./api/tests
7474
run: docker compose down -v
7575

7676
deploy:
File renamed without changes.
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ services:
4343

4444
api:
4545
build:
46-
context: ../api
46+
context: ..
4747
ports:
4848
- "8000:8000"
4949
depends_on:
File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"testing"
1111
"time"
1212

13-
httpsms "github.com/NdoleStudio/httpsms-go"
13+
"github.com/NdoleStudio/httpsms-go"
1414
"github.com/stretchr/testify/assert"
1515
"github.com/stretchr/testify/require"
1616
)
File renamed without changes.

0 commit comments

Comments
 (0)