Skip to content

ci: add skip directives for long tests #3151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 37 commits into from
Jul 24, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
f98499f
ci: add skip directives for long tests
ammario Jul 23, 2022
32618bd
ci: add prcontext
ammario Jul 23, 2022
fe41fb3
fixup! ci: add prcontext
ammario Jul 23, 2022
c37a58d
fixup! ci: add prcontext
ammario Jul 23, 2022
2bdf016
fixup! ci: add prcontext
ammario Jul 23, 2022
d58657b
fixup! ci: add prcontext
ammario Jul 23, 2022
1b9fdc1
fixup! ci: add prcontext
ammario Jul 23, 2022
93dcb82
fixup! ci: add prcontext
ammario Jul 23, 2022
73e073f
fixup! ci: add prcontext
ammario Jul 23, 2022
a38e3eb
fixup! ci: add prcontext
ammario Jul 23, 2022
f2de14a
fixup! ci: add prcontext
ammario Jul 23, 2022
8c3dfde
fixup! ci: add prcontext
ammario Jul 23, 2022
8a1f597
fixup! ci: add prcontext
ammario Jul 23, 2022
11b0bb9
fixup! ci: add prcontext
ammario Jul 23, 2022
0b9b417
fixup! ci: add prcontext
ammario Jul 24, 2022
ff15370
fixup! ci: add prcontext
ammario Jul 24, 2022
d6a2f7b
fixup! ci: add prcontext
ammario Jul 24, 2022
9a379a5
fixup! ci: add prcontext
ammario Jul 24, 2022
31d4390
Optimize style/gen with go cache
ammario Jul 24, 2022
9d76dd4
fixup! Optimize style/gen with go cache
ammario Jul 24, 2022
ebd9937
fixup! Optimize style/gen with go cache
ammario Jul 24, 2022
9ddf43a
fixup! Optimize style/gen with go cache
ammario Jul 24, 2022
13b75c6
fixup! Optimize style/gen with go cache
ammario Jul 24, 2022
003b158
fixup! Optimize style/gen with go cache
ammario Jul 24, 2022
96a76e6
fixup! Optimize style/gen with go cache
ammario Jul 24, 2022
d361dd2
fixup! Optimize style/gen with go cache
ammario Jul 24, 2022
be3b574
fixup! Optimize style/gen with go cache
ammario Jul 24, 2022
d329023
fixup! Optimize style/gen with go cache
ammario Jul 24, 2022
cbea04d
fixup! Optimize style/gen with go cache
ammario Jul 24, 2022
9e3c2f7
fixup! Optimize style/gen with go cache
ammario Jul 24, 2022
f3e3a79
fixup! Optimize style/gen with go cache
ammario Jul 24, 2022
0846d26
fixup! Optimize style/gen with go cache
ammario Jul 24, 2022
a44d023
Enable caching in webpack
ammario Jul 24, 2022
5609487
fixup! Enable caching in webpack
ammario Jul 24, 2022
7e05781
fixup! Enable caching in webpack
ammario Jul 24, 2022
526fea9
fixup! Enable caching in webpack
ammario Jul 24, 2022
3fe2eaa
fixup! Enable caching in webpack
ammario Jul 24, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! ci: add prcontext
  • Loading branch information
ammario committed Jul 23, 2022
commit f2de14a9bb0b314daeb10b83001ac904e13fbc3a
4 changes: 2 additions & 2 deletions .github/workflows/prcontext/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ func main() {
return
}

_, _ = fmt.Printf("---\n%s\n---\n", c.Event.PullRequest.Body)
_, _ = fmt.Printf("::group::{PR Body}\n%s\n::endgroup::\n", c.Event.PullRequest.Body)

skips := parseBody(c.Event.PullRequest.Body)
_, _ = fmt.Printf("::set-output name=skips::[%s]\n", strings.Join(skips, " "))
_, _ = fmt.Printf("::echo::on\n::set-output name=skips::[%s]\n", strings.Join(skips, " "))
}
4 changes: 1 addition & 3 deletions .github/workflows/prcontext/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ package main
import (
"regexp"
"strings"

"github.com/coder/flog"
)

const ciSkipPrefix = "ci-skip"
Expand All @@ -19,7 +17,7 @@ func parseBody(body string) (skips []string) {
for i := range matches {
for j := range matches[i] {
v := matches[i][j]
flog.Info("%q", v)
// flog.Info("%q", v)
if !strings.Contains(v, ciSkipPrefix) {
skipMatches = append(skipMatches, strings.Split(v, " ")...)
}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prcontext/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func Test_parseBody(t *testing.T) {
{"no directive", args{"test pr 123\n\n"}, nil},
{"single dir single skip", args{"test pr [ci-skip dog] 123\n\n"}, []string{"dog"}},
{"double dir double skip", args{"test pr [ci-skip dog] [ci-skip cat] 123\n\n"}, []string{"dog", "cat"}},
{"single dir double skip", args{"test pr [ci-skip dog cat] 123\n\n"}, []string{"dog", "cat"}},
{"single dir double skip", args{"test pr [ci-skip test/go/postgres cat] 123\n\n"}, []string{"test/go/postgres", "cat"}},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down