Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ jobs:
- uses: actions/setup-go@v6
with:
go-version: '1.25'
- name: go fmt
run: go fmt ./...
working-directory: db

- run: make db-fmt
- name: Ensure formatting
run: |
if [ -n "$(gofmt -l .)" ]; then
Expand All @@ -30,9 +29,5 @@ jobs:
fi
git diff --exit-code
working-directory: db
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kollidiert das nicht mit 'cd db' im nachfolgenden 'make db-vet'?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ne, das ist nur für diesen Step

- name: go vet
run: go vet ./...
working-directory: db
- name: go test
run: go test ./...
working-directory: db
- run: make db-vet
- run: make db-test
20 changes: 14 additions & 6 deletions .github/workflows/web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ on:
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web

steps:
- uses: actions/checkout@v6
Expand All @@ -25,6 +22,17 @@ jobs:
with:
node-version: '22'

- run: npm install
- run: npm run check
- run: npm run test:unit
- uses: actions/setup-go@v6
with:
go-version: '1.25'

- run: make db-build-docker

- run: make web-build-docker

- run: docker compose up -d

- run: make web-install
- run: make web-playwright-install
- run: make web-check
- run: make web-test
43 changes: 43 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
## db

.PHONY: db-fmt
db-fmt:
cd db && go fmt ./...

.PHONY: db-vet
db-vet:
cd db && go vet ./...

.PHONY: db-test
db-test:
cd db && go test ./...

.PHONY: db-build
db-build:
cd db && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o pocketbase_amd64

.PHONY: db-build-docker
db-build-docker: db-build
docker buildx build db/ --no-cache -t flomp/wanderer-db:latest

## Web

.PHONY: web-install
web-install:
cd web && npm install

.PHONY: web-playwright-install
web-playwright-install:
cd web && npx playwright install --with-deps chromium

.PHONY: web-check
web-check:
cd web && npm run check

.PHONY: web-test
web-test:
cd web && npm run test

.PHONY: web-build-docker
web-build-docker:
docker buildx build web/ --no-cache -t flomp/wanderer-web:latest
4 changes: 2 additions & 2 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ services:
volumes:
- pb_data:/pb_data
healthcheck:
test: wget --spider -q http://localhost:8090/health || exit 1
test: ["CMD", "/curl", "--fail", "http://localhost:8090/health"]
interval: 15s
retries: 10
start_period: 20s
Expand Down Expand Up @@ -62,7 +62,7 @@ services:
- "3000"
restart: unless-stopped
healthcheck:
test: curl --fail http://localhost:3000/ || exit 1
test: ["CMD", "/curl", "--fail", "http://localhost:3000/"]
interval: 15s
retries: 10
start_period: 20s
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ services:
volumes:
- ./data/pb_data:/pb_data
healthcheck:
test: wget --spider -q http://localhost:8090/health || exit 1
test: ["CMD", "/curl", "--fail", "http://localhost:8090/health"]
interval: 15s
retries: 10
start_period: 20s
Expand Down Expand Up @@ -76,7 +76,7 @@ services:
- wanderer
restart: unless-stopped
healthcheck:
test: curl --fail http://localhost:3000/ || exit 1
test: ["CMD", "/curl", "--fail", "http://localhost:3000/"]
interval: 15s
retries: 10
start_period: 20s
Expand Down
2 changes: 1 addition & 1 deletion web/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default defineConfig({
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
baseURL: "http://localhost:5173",
baseURL: "http://localhost:3000",

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
Expand Down
Loading