CI prep + README

This commit is contained in:
Niko Abeler 2024-05-18 19:49:55 +02:00
parent 5c05f48be3
commit 596ab0047e
2 changed files with 46 additions and 11 deletions

View File

@ -2,17 +2,9 @@
# Owl Blogs # Owl Blogs
A simple web server for blogs generated from Markdown files. Owl-blogs is a blogging software focused on simplicity with IndieWeb and Fediverse support.
**_This project is not yet stable. Expect frequent breaking changes! Only use this if you are willing to regularly adjust your project accordingly._** # Usage
## Build
```
CGO_ENABLED=1 go build -o owl ./cmd/owl
```
## Run ## Run
@ -34,4 +26,36 @@ To retrieve a list of all commands run:
``` ```
owl -h owl -h
``` ```
# Development
## Build
```
CGO_ENABLED=1 go build -o owl ./cmd/owl
```
For development with live reload use `air` ([has to be install first](https://github.com/cosmtrek/air))
## Tests
The project has two test suites; "unit tests" written in go and "end-to-end tests" written in python.
### Unit Tests
```
go test ./...
```
### End-to-End tests
- Start the docker compose setup in the `e2e_tests` directory.
- Install the python dependencies into a virtualenv
```
cd e2e_tests
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
```
- Run the e2e_tests with `pytest`

View File

@ -0,0 +1,11 @@
services:
web:
build:
context: ../
dockerfile: Dockerfile
ports:
- "3000:3000"
mock_masto:
build: mock_masto
ports:
- 8000:8000