diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-20 22:56:21 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-20 22:56:21 +0200 |
| commit | f407b81ae98a7edc669cf315c4ec47a58112dacf (patch) | |
| tree | 7804d2db9652dca64b1626ef18286ae48cb1faf0 | |
| parent | eb3da18b530f8049212480e0be47fa8e00f97c73 (diff) | |
.github/workflows: Add CI configuration with GitHub Actions
- Test job: runs all tests
- Lint job: runs golangci-lint
- Build job: builds and tests the binary
| -rw-r--r-- | .github/workflows/ci.yml | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..36b383e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,55 @@ +name: CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.22' + + - name: Run tests + run: go test ./... + + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.22' + + - name: Run golangci-lint + uses: golangci/golangci-lint-action@v4 + with: + version: latest + + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.22' + + - name: Build + run: go build -o perc ./cmd/perc + + - name: Test build + run: ./perc version |
