gotsha 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +2 -0
- data/lib/gotsha/actions/init.rb +7 -0
- data/lib/gotsha/config.rb +2 -0
- data/lib/gotsha/templates/gitlab_action_example.yml +19 -0
- data/lib/gotsha/version.rb +1 -1
- data/web/index.html +2 -2
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ed625986aebeeabaea7689b5947bd0620f5d1ffddc4be82ad382186b2dfe8675
|
|
4
|
+
data.tar.gz: 673479b9ab6161d9e15c714921a4d3d08d93315e03e9f27c08cf38ca6f6609d8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 770b572970ce1a40ead09fad29fbddb3d318984f36d3b5151a96081b57af7004b3b7e0fa9c9e7b67fc7a23295f1fb138b83fe1edf90ea6b4e2c385b205cfdb8b
|
|
7
|
+
data.tar.gz: ca4db01a5327aac3d4b48bd3f7ede37c08c3ed5ebb899c8cfd350db057ca47e8f44190f983c2fdaf8d9198237baef7bfd8a4612d94977c9732ef70d7ac2031bb
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -30,5 +30,7 @@ Then, you can see the tests results in a Github action:
|
|
|
30
30
|
|
|
31
31
|
Based on your workflow and tests speed, you can configure them to auto-run on every commit, before every push, or just manually. Whenever pushing to remote repository, the Git note (which is what's used to store the test results) gets sent there as well.
|
|
32
32
|
|
|
33
|
+
Both Github and GitLab are supported out of the box!
|
|
34
|
+
|
|
33
35
|
## Do you like Gotsha?
|
|
34
36
|
<a href="https://buymeacoffee.com/gotsha">I like coffee!</a>
|
data/lib/gotsha/actions/init.rb
CHANGED
|
@@ -10,6 +10,7 @@ module Gotsha
|
|
|
10
10
|
|
|
11
11
|
config_files!
|
|
12
12
|
github_action!
|
|
13
|
+
gitlab_action!
|
|
13
14
|
hooks!
|
|
14
15
|
|
|
15
16
|
# TODO: I don't like this
|
|
@@ -36,6 +37,12 @@ module Gotsha
|
|
|
36
37
|
File.write(Config::GH_CONFIG_FILE, File.read(Config::GH_CONFIG_TEMPLATE_PATH))
|
|
37
38
|
end
|
|
38
39
|
|
|
40
|
+
def gitlab_action!
|
|
41
|
+
return if File.exist?(Config::GL_CONFIG_FILE)
|
|
42
|
+
|
|
43
|
+
File.write(Config::GL_CONFIG_FILE, File.read(Config::GL_CONFIG_TEMPLATE_PATH))
|
|
44
|
+
end
|
|
45
|
+
|
|
39
46
|
def hooks!
|
|
40
47
|
return if File.exist?("#{Config::HOOKS_DIR}/post-commit") && File.exist?("#{Config::HOOKS_DIR}/pre-push")
|
|
41
48
|
|
data/lib/gotsha/config.rb
CHANGED
|
@@ -7,6 +7,8 @@ module Gotsha
|
|
|
7
7
|
CONFIG_TEMPLATE_PATH = File.expand_path("templates/config.toml", __dir__)
|
|
8
8
|
GH_CONFIG_FILE = File.join(".github", "workflows", "gotsha.yml")
|
|
9
9
|
GH_CONFIG_TEMPLATE_PATH = File.expand_path("templates/github_action_example.yml", __dir__)
|
|
10
|
+
GL_CONFIG_FILE = ".gitlab-ci.yml"
|
|
11
|
+
GL_CONFIG_TEMPLATE_PATH = File.expand_path("templates/gitlab_action_example.yml", __dir__)
|
|
10
12
|
HOOKS_TEMPLATES_DIR = File.expand_path("templates", __dir__)
|
|
11
13
|
HOOKS_DIR = File.join(CONFIG_DIR, "hooks")
|
|
12
14
|
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
stages: [verify]
|
|
2
|
+
|
|
3
|
+
verify_gotsha:
|
|
4
|
+
stage: verify
|
|
5
|
+
image: ruby:3.3
|
|
6
|
+
variables:
|
|
7
|
+
GIT_DEPTH: "0"
|
|
8
|
+
GIT_STRATEGY: fetch
|
|
9
|
+
GOTSHA_CI: "1"
|
|
10
|
+
only:
|
|
11
|
+
- merge_requests
|
|
12
|
+
before_script:
|
|
13
|
+
- ruby -v
|
|
14
|
+
- apt-get update && apt-get install -y git
|
|
15
|
+
- gem install gotsha
|
|
16
|
+
script:
|
|
17
|
+
- gotsha fetch
|
|
18
|
+
- gotsha show
|
|
19
|
+
|
data/lib/gotsha/version.rb
CHANGED
data/web/index.html
CHANGED
|
@@ -140,8 +140,8 @@ gotsha configure <span style="color: gray;"># this will open the config file; it
|
|
|
140
140
|
<p>Test results from every run are attached as <em>Git notes</em> for the recent commit SHA. (Got-SHA... you get it, right?)</p>
|
|
141
141
|
</article>
|
|
142
142
|
<article>
|
|
143
|
-
<h3>3) Displays results in your GitHub PR</h3>
|
|
144
|
-
<p>Push as usual — the note follows your commit, and tiny
|
|
143
|
+
<h3>3) Displays results in your GitHub PR / GitLab MR</h3>
|
|
144
|
+
<p>Push as usual — the note follows your commit, and tiny CI script instantly verifies it
|
|
145
145
|
and makes the tests result visible to reviewers.
|
|
146
146
|
<img
|
|
147
147
|
style="max-width: 100%; height: auto; display: block; margin: 15px auto;"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gotsha
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vitek Meloun
|
|
@@ -60,6 +60,7 @@ files:
|
|
|
60
60
|
- lib/gotsha/templates/git_hooks/post-commit
|
|
61
61
|
- lib/gotsha/templates/git_hooks/pre-push
|
|
62
62
|
- lib/gotsha/templates/github_action_example.yml
|
|
63
|
+
- lib/gotsha/templates/gitlab_action_example.yml
|
|
63
64
|
- lib/gotsha/user_config.rb
|
|
64
65
|
- lib/gotsha/version.rb
|
|
65
66
|
- sig/gotsha.rbs
|