Najprostszy możliwy Taskfile - idealny na początek.
Ten przykład pokazuje minimalną konfigurację Taskfile bez:
minimal/
├── Taskfile.yml # Definicja tasków
├── Makefile # Dla porównania (stary sposób)
└── README.md # Ten plik
| Task | Opis | Zależności |
|---|---|---|
test |
Uruchom testy (pytest) | - |
build |
Zbuduj obraz Docker | test |
run |
Uruchom lokalnie | - |
# Zainstaluj taskfile
pip install taskfile
# Zobacz dostępne taski
taskfile list
# Uruchom testy
taskfile run test
# Zbuduj (automatycznie uruchomi testy pierwsze)
taskfile run build
# Uruchom aplikację
taskfile run run
build:
deps: [test] # Najpierw uruchomi `test`, potem build
test:
stage: test # Grupa tasków
build:
stage: build # Można uruchomić wszystkie z etapu
Makefile:
test:
pytest -v
build: test
docker build -t my-app:latest .
Taskfile:
test:
desc: Run tests
stage: test
cmds:
- pytest -v
build:
desc: Build Docker image
stage: build
deps: [test]
cmds:
- docker build -t my-app:latest .
✅ Projekty lokalne (bez VPS)
✅ Szybki start z taskfile
✅ Proste CI/CD bez deploy na serwer
Zobacz inne przykłady: