Skip to content

Commit 4e2b175

Browse files
authored
Merge pull request #1 from psturc/RHTAP-1851
feat: make it suitable for openshift-ci
2 parents f58d89e + b8c8972 commit 4e2b175

File tree

22 files changed

+333
-554
lines changed

22 files changed

+333
-554
lines changed

.github/dependabot.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "gomod"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
time: "08:00"
8+
labels:
9+
- "dependencies"
10+
commit-message:
11+
prefix: "feat"
12+
include: "scope"
13+
- package-ecosystem: "github-actions"
14+
directory: "/"
15+
schedule:
16+
interval: "weekly"
17+
time: "08:00"
18+
labels:
19+
- "dependencies"
20+
commit-message:
21+
prefix: "chore"
22+
include: "scope"
23+
- package-ecosystem: "docker"
24+
directory: "/"
25+
schedule:
26+
interval: "weekly"
27+
time: "08:00"
28+
labels:
29+
- "dependencies"
30+
commit-message:
31+
prefix: "feat"
32+
include: "scope"

.github/workflows/goreleaser.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/lint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: golangci-lint
2+
on:
3+
push:
4+
paths:
5+
- '**.go'
6+
branches:
7+
- main
8+
pull_request:
9+
10+
jobs:
11+
golangci:
12+
name: lint
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: actions/setup-go@v4
18+
with:
19+
go-version: '1.19'
20+
21+
- name: golangci-lint
22+
uses: golangci/golangci-lint-action@v3
23+
with:
24+
version: v1.55.1
25+
args: -v --timeout=5m

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
junit2html

.goreleaser.yaml

Lines changed: 0 additions & 43 deletions
This file was deleted.

Formula/junit2html.rb

Lines changed: 0 additions & 47 deletions
This file was deleted.

Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
projectname?=junit2html
2+
3+
export GOFLAGS := -mod=mod
4+
5+
default: help
6+
7+
.PHONY: help
8+
help: ## list makefile targets
9+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
10+
11+
.PHONY: build
12+
build: ## build golang binary
13+
@go build -ldflags "-X main.version=$(shell git describe --abbrev=0 --tags --always)" -o $(projectname)
14+
15+
.PHONY: install
16+
install: ## install golang binary
17+
@go install -ldflags "-X main.version=$(shell git describe --abbrev=0 --tags --always)"

README.md

Lines changed: 5 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,43 +11,15 @@ Convert Junit XML reports (`junit.xml`) into HTML reports using a single standal
1111

1212
![screenshot](screenshot.png)
1313

14-
## Install
15-
16-
Like `jq`, `junit2html` is a tiny (8Mb) standalone binary. You can download it from the [releases page](https://github.com/kitproj/junit2html/releases/latest).
17-
18-
If you're on MacOS, you can use `brew`:
19-
20-
```bash
21-
brew tap kitproj/junit2html --custom-remote https://github.com/kitproj/junit2html
22-
brew install junit2html
23-
```
24-
25-
Otherwise, you can use `curl`:
26-
27-
```bash
28-
curl -q https://raw.githubusercontent.com/kitproj/junit2html/main/install.sh | sh
29-
```
30-
3114
## Usage
3215

33-
Here is an example that uses trap to always created the test report:
16+
### Build
3417

3518
```bash
36-
go install github.com/alexec/junit2html@latest
37-
38-
trap 'go-junit-report < test.out > junit.xml && junit2html < junit.xml > test-report.html' EXIT
39-
40-
go test -v -cover ./... 2>&1 > test.out
19+
make build
4120
```
4221

43-
💡 Don't use pipes (i.e. `|`) in shell, pipes swallow exit codes. Use `<` and `>` which is POSIX compliant.
44-
45-
## Test
46-
47-
How to test this locally:
48-
22+
### Run
4923
```bash
50-
go test -v -cover ./... 2>&1 > test.out
51-
go-junit-report < test.out > junit.xml
52-
go run . < junit.xml > test-report.html
53-
```
24+
./junit2html < <junit-file.xml> > <output-report.html>
25+
```

example/coverage/coverage.go

Lines changed: 0 additions & 11 deletions
This file was deleted.

example/coverage/coverage_test.go

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)