Skip to content

Commit

Permalink
ci: unify github actions for merge and pull request
Browse files Browse the repository at this point in the history
There's no need to do anything different and last merge showed it's not good when the
actions drift apart. PR coverage was ok, but merge coverage is abysmal since the action
fell behind.

And while we're at it, remove the `// ignore.coverage` comment from lines where it has no
effect.
  • Loading branch information
sne11ius committed May 18, 2024
1 parent 9561641 commit 664ba47
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 47 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: Check

on:
- pull_request
pull_request:
push:
branches:
- main

jobs:
lint-commit:
Expand Down
40 changes: 0 additions & 40 deletions .github/workflows/merge.yaml

This file was deleted.

6 changes: 3 additions & 3 deletions client/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ with the given id.` +
err = ui.App.Run()
if err != nil { // ignore.coverage
log.Fatalf("Could not do stuff: %v", err) // ignore.coverage
} // ignore.coverage
}
} else {
fmt.Println("Running in test mode - no tui, no ws")
}
Expand All @@ -101,12 +101,12 @@ func getWsURL() string {
res, err := client.Get(roomURL) //nolint:bodyclose // its in the defer below
if err != nil { // ignore.coverage
log.Fatalf("error making http request: %s\n", err) // ignore.coverage
} // ignore.coverage
}
defer func(Body io.ReadCloser) {
err := Body.Close()
if err != nil { // ignore.coverage
log.Fatalf("error closing body: %s\n", err) // ignore.coverage
} // ignore.coverage
}
}(res.Body)
var location string
if res.StatusCode == http.StatusTemporaryRedirect {
Expand Down
6 changes: 3 additions & 3 deletions client/tui.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (tui *TUI) createUsersTable() *tview.Flex {
_, err := usersText.Write([]byte(usernames))
if err != nil { // ignore.coverage
log.Fatalf("Could not write to text: %v", err) // ignore.coverage
} // ignore.coverage
}

cardValuesText := tview.NewTextView().
SetWordWrap(false)
Expand All @@ -122,7 +122,7 @@ func (tui *TUI) createUsersTable() *tview.Flex {
_, err = cardValuesText.Write([]byte(cardValues))
if err != nil { // ignore.coverage
log.Fatalf("Could not write to text: %v", err) // ignore.coverage
} // ignore.coverage
}

usersTable := tview.NewFlex().
AddItem(usersText, 0, 3, false).
Expand All @@ -138,7 +138,7 @@ func (tui *TUI) createUsersTable() *tview.Flex {
_, err = averageText.Write([]byte(tui.Room.Average))
if err != nil { // ignore.coverage
log.Fatalf("Could not write to text: %v", err) // ignore.coverage
} // ignore.coverage
}

tableWithAverage := tview.NewFlex().
AddItem(nil, 0, 3, false).
Expand Down

0 comments on commit 664ba47

Please sign in to comment.