This repository was archived by the owner on Mar 12, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtaskfile.yaml
More file actions
60 lines (57 loc) · 1.76 KB
/
taskfile.yaml
File metadata and controls
60 lines (57 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
version: '3'
includes:
frontend:
taskfile: ./frontend/app/taskfile.yaml
dir: ./frontend/app
backend:
taskfile: ./backend/taskfile.yaml
dir: ./backend
e2e:
taskfile: ./e2e/taskfile.yaml
dir: ./e2e
tasks:
setup:
deps: [frontend:setup, backend:setup]
cmds:
- python --version || echo "Python not found, please install it"
- pre-commit --version || python -m pip install pre-commit || echo "Pre-commit not found, please install it"
- pre-commit install --hook-type commit-msg --hook-type pre-commit --hook-type pre-push || python -m pre-commit install --hook-type commit-msg --hook-type pre-commit --hook-type pre-push
run:
deps: [frontend:run, backend:run]
build:
deps: [frontend:build, backend:build]
test:
cmds:
- task: frontend:test
- task: backend:test
- task: run-container-background
- task: e2e:test
cleanup: stop-container
lint:
deps: [frontend:lint]
format:
deps: [frontend:format, backend:format]
format-check:
deps: [frontend:format-check, backend:format-check]
clean:
deps: [frontend:clean, backend:clean]
build-container:
deps: [build]
sources:
- Containerfile
- frontend/**
- backend/**
- misc/**
cmds:
- buildah build -t corewar . || docker build -t corewar -f Containerfile .
run-container:
deps: [build-container]
cmds:
- podman run -p 3000:80 --replace --name corewar corewar || docker run -p 3000:80 --name corewar corewar
run-container-background:
deps: [build-container]
cmds:
- podman run -d -p 3000:80 --replace --name corewar corewar || docker run -d -p 3000:80 --name corewar corewar
stop-container:
cmds:
- podman stop corewar || docker stop corewar || true