ai cooking
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at master 209 lines 4.7 kB view raw
1# Install Task: go install github.com/go-task/task/v3/cmd/task@latest 2version: "3" 3 4env: 5 GOCACHE: '{{default "/tmp/go-build" .GOCACHE}}' 6 GOMODCACHE: '{{default "/tmp/go-modcache" .GOMODCACHE}}' 7 GOLANGCI_LINT_CACHE: '{{default "/tmp/golangci-lint" .GOLANGCI_LINT_CACHE}}' 8 9tasks: 10 default: 11 desc: List available tasks 12 cmds: 13 - task --list 14 silent: true 15 16 ci: 17 desc: Run the local equivalent of CI checks and image builds 18 deps: 19 - verify 20 - vet 21 - format-check 22 - lint 23 - k8s-lint 24 - tailwind-check 25 - docker-build-all 26 27 verify: 28 desc: Run the broader local verification suite 29 deps: 30 - fmt 31 - vet 32 - test 33 - lint 34 - k8s-lint 35 - tailwind-check 36 37 fmt: 38 desc: Format Go code with gofumpt 39 deps: 40 - gofumpt 41 cmds: 42 - ./bin/gofumpt -w . 43 44 vet: 45 desc: Run go vet 46 cmds: 47 - go vet ./... 48 49 lint: 50 desc: Run golangci-lint 51 deps: 52 - golangci-lint 53 cmds: 54 - ./bin/golangci-lint run ./... --timeout=5m 55 56 fmt-check: 57 desc: Check Go formatting with gofumpt 58 deps: 59 - gofumpt 60 cmds: 61 - | 62 files="$(./bin/gofumpt -l .)" 63 test -z "$files" || { 64 printf '%s\n' "$files" 65 exit 1 66 } 67 68 k8s-lint: 69 desc: Validate Kubernetes manifests with kubeconform 70 deps: 71 - kubeconform 72 cmds: 73 - ./bin/kubeconform -strict -summary deploy/*.yaml 74 75 test: 76 desc: Run tests with mocks enabled by default 77 env: 78 ENABLE_MOCKS: '{{default "1" .ENABLE_MOCKS}}' 79 cmds: 80 - go test ./... 81 82 css: 83 desc: Rebuild Tailwind output 84 cmds: 85 - bash tailwind/generate.sh 86 87 tailwind-check: 88 desc: Regenerate Tailwind output and fail on uncommitted changes 89 cmds: 90 - bash tailwind/generate.sh 91 - git diff --exit-code 92 93 docker-build: 94 desc: Build one Docker image locally without pushing 95 vars: 96 CMD_PATH: '{{default "./cmd/careme" .CMD_PATH}}' 97 IMAGE: '{{default "careme-local" .IMAGE}}' 98 cmds: 99 - docker build --build-arg CMD_PATH={{.CMD_PATH}} -t {{.IMAGE}} . 100 101 docker-build-all: 102 desc: Build the same image matrix as CI locally without pushing 103 internal: true 104 deps: 105 - docker-build-careme 106 - docker-build-wholefoods 107 - docker-build-albertsons 108 - docker-build-publix 109 - docker-build-aldi 110 111 docker-build-careme: 112 desc: Build the careme image locally 113 internal: true 114 cmds: 115 - task: docker-build 116 vars: 117 CMD_PATH: ./cmd/careme 118 IMAGE: careme-local 119 120 docker-build-wholefoods: 121 desc: Build the wholefoods image locally 122 internal: true 123 cmds: 124 - task: docker-build 125 vars: 126 CMD_PATH: ./cmd/wholefoods 127 IMAGE: careme-wholefoods-local 128 129 docker-build-albertsons: 130 desc: Build the albertsons image locally 131 internal: true 132 cmds: 133 - task: docker-build 134 vars: 135 CMD_PATH: ./cmd/albertsons 136 IMAGE: careme-albertsons-local 137 138 docker-build-publix: 139 desc: Build the publix image locally 140 internal: true 141 cmds: 142 - task: docker-build 143 vars: 144 CMD_PATH: ./cmd/publix 145 IMAGE: careme-publix-local 146 147 docker-build-aldi: 148 desc: Build the aldi image locally 149 internal: true 150 cmds: 151 - task: docker-build 152 vars: 153 CMD_PATH: ./cmd/aldi 154 IMAGE: careme-aldi-local 155 156 serve: 157 desc: Run the local web server 158 vars: 159 ADDR: '{{default ":8080" .ADDR}}' 160 cmds: 161 - go run ./cmd/careme -serve -addr {{.ADDR}} 162 163 zipcode: 164 desc: Look up locations for a ZIP code 165 vars: 166 ZIP: '{{default "98101" .ZIP}}' 167 cmds: 168 - go run ./cmd/careme -zipcode {{.ZIP}} 169 170 producecheck: 171 desc: Run produce scoring checks for generator changes 172 vars: 173 LOCATION: '{{default "70500874" .LOCATION}}' 174 cmds: 175 - go run ./cmd/producecheck -location {{.LOCATION}} 176 177 deploy: 178 desc: Deploy the app using deploy/deploy.sh 179 vars: 180 REF: '{{default "origin/master" .REF}}' 181 NAMESPACE: '{{default "careme" .NAMESPACE}}' 182 cmds: 183 - bash deploy/deploy.sh {{.REF}} {{.NAMESPACE}} 184 185 tools: 186 desc: Install pinned local CI tools into ./bin 187 cmds: 188 - bash tools/install.sh 189 190 gofumpt: 191 internal: true 192 status: 193 - test -x ./bin/gofumpt 194 cmds: 195 - bash tools/install.sh gofumpt 196 197 golangci-lint: 198 internal: true 199 status: 200 - test -x ./bin/golangci-lint 201 cmds: 202 - bash tools/install.sh golangci-lint 203 204 kubeconform: 205 internal: true 206 status: 207 - test -x ./bin/kubeconform 208 cmds: 209 - bash tools/install.sh kubeconform