Skip to content

Commit 1625ac9

Browse files
committed
Automate Go testing and linting via GitHub Actions
Set up a continuous integration workflow to verify formatting, vet code, and run tests on every push and pull request.
1 parent 2601b12 commit 1625ac9

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
check:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- uses: actions/setup-go@v5
15+
with:
16+
go-version-file: go.mod
17+
18+
- name: Check formatting
19+
run: test -z "$(gofmt -l .)"
20+
21+
- name: Vet
22+
run: go vet ./...
23+
24+
- name: Test
25+
run: go test ./...
26+
27+
- name: Build
28+
run: go build ./...

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# shellshape
22

3+
[![CI](https://github.com/micthiesen/shellshape/actions/workflows/ci.yml/badge.svg)](https://github.com/micthiesen/shellshape/actions/workflows/ci.yml)
4+
35
Normalize shell commands into stable "shapes" for use as cache keys,
46
fingerprints, or classification inputs.
57

0 commit comments

Comments
 (0)