You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+81Lines changed: 81 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -154,3 +154,84 @@ For more context and information see [issue #57](https://github.com/awalsh128/ca
154
154
### Cache Limits
155
155
156
156
A repository can have up to 5GB of caches. Once the 5GB limit is reached, older caches will be evicted based on when the cache was last accessed. Caches that are not accessed within the last week will also be evicted. To get more information on how to access and manage your actions's caches, see [GitHub Actions / Using workflows / Cache dependencies](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#viewing-cache-entries).
157
+
158
+
## Development
159
+
160
+
### Prerequisites
161
+
162
+
- **Go 1.20+** (for building the `apt_query` binary) - version specified in `go.mod`
163
+
- Install from [golang.org](https://golang.org/dl/) or via package manager
- Linux: `sudo apt-get install shellcheck`or see [shellcheck installation guide](https://github.com/koalaman/shellcheck#installing)
168
+
- Windows: Available via [scoop](https://scoop.sh/) or [chocolatey](https://chocolatey.org/)
169
+
170
+
### Building
171
+
172
+
The project includes Go binaries (`apt_query-arm64` and `apt_query-x86`) that are used by the shell scripts to query APT package information.
173
+
174
+
**Build all packages:**
175
+
```bash
176
+
go build -v ./...
177
+
```
178
+
179
+
**Build for specific architecture:**
180
+
```bash
181
+
# For ARM64 (Apple Silicon, ARM servers)
182
+
GOARCH=arm64 go build -o apt_query-arm64 ./src/cmd/apt_query
183
+
184
+
# For x86_64 (Intel/AMD)
185
+
GOARCH=amd64 go build -o apt_query-x86 ./src/cmd/apt_query
186
+
```
187
+
188
+
**Run tests:**
189
+
```bash
190
+
go test -v ./...
191
+
```
192
+
193
+
### Linting
194
+
195
+
This project uses [ShellCheck](https://github.com/koalaman/shellcheck) to ensure shell script quality and catch common errors. The configuration is stored in `.shellcheckrc`.
196
+
197
+
**Run ShellCheck locally:**
198
+
```bash
199
+
shellcheck *.sh
200
+
```
201
+
202
+
**IDE Integration:**
203
+
204
+
Many IDEs and editors can automatically run ShellCheck:
205
+
206
+
- **VS Code**: Install the [ShellCheck extension](https://marketplace.visualstudio.com/items?itemName=timonwong.shellcheck)
207
+
- **Vim/Neovim**: Use [ALE](https://github.com/dense-analysis/ale) or [coc-shellcheck](https://github.com/josa42/coc-shellcheck)
208
+
- **IntelliJ/CLion**: ShellCheck is integrated in recent versions
This project uses [golangci-lint](https://golangci-lint.run/) for Go code quality checks.
214
+
215
+
**Run golangci-lint locally:**
216
+
```bash
217
+
# Install golangci-lint (if not already installed)
218
+
# macOS: brew install golangci-lint
219
+
# Linux: See https://golangci-lint.run/usage/install/
220
+
221
+
golangci-lint run
222
+
```
223
+
224
+
**IDE Integration:**
225
+
226
+
- **VS Code**: Install the [Go extension](https://marketplace.visualstudio.com/items?itemName=golang.go) for syntax highlighting, auto-completion, and built-in linting
227
+
- **IntelliJ/GoLand**: Built-in Go support with linting and formatting
228
+
- **Vim/Neovim**: Use [vim-go](https://github.com/fatih/vim-go) for Go development
229
+
230
+
### CI/CD
231
+
232
+
The GitHub Actions workflows will automatically:
233
+
- **Build and test** Go code on pull requests
234
+
- **Run ShellCheck** on shell scripts (blocks PRs on failures)
235
+
- **Run golangci-lint** on Go code (blocks PRs on failures)
236
+
237
+
All checks run on pull requests and pushes to `master`, `dev`, and `staging` branches.
0 commit comments