Skip to content
This repository has been archived by the owner on Mar 25, 2023. It is now read-only.

Update docs issue #1 #11

Merged
merged 30 commits into from
May 19, 2022
Merged

Update docs issue #1 #11

merged 30 commits into from
May 19, 2022

Conversation

nelsonic
Copy link
Member

@SimonLab please have a look when you can. thanks.

@nelsonic nelsonic added the awaiting-review An issue or pull request that needs to be reviewed label May 18, 2022
@codecov
Copy link

codecov bot commented May 18, 2022

Codecov Report

Merging #11 (2298a13) into main (25c6e48) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main       #11   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         5           
  Lines          129       126    -3     
=========================================
- Hits           129       126    -3     
Impacted Files Coverage Δ
lib/helpers.ex 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 25c6e48...2298a13. Read the comment docs.

@nelsonic
Copy link
Member Author

I don't understand why the "test msg" is being committed to the actual repo ...

image

Noticed it yesterday: https://github.com/dwyl/gitea/commits/main

image

But didn't think anything of it ... thought you were just testing something. 🤷‍♂️

test/gitea_test.exs Outdated Show resolved Hide resolved
tmp/test-repo/README.md Outdated Show resolved Hide resolved
@SimonLab
Copy link
Member

SimonLab commented May 18, 2022

re #11 (comment)
I think the commits are created when the tests are failing, maybe some cleaning up function haven't had the time to run

.gitmodules Show resolved Hide resolved
Copy link
Member

@SimonLab SimonLab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a few comments, let me know what you think 👍

@SimonLab SimonLab assigned nelsonic and unassigned SimonLab May 18, 2022
@SimonLab SimonLab added in-review Issue or pull request that is currently being reviewed by the assigned person and removed awaiting-review An issue or pull request that needs to be reviewed labels May 18, 2022
@nelsonic
Copy link
Member Author

If I run the tests with mock: false

I get the following:

Finished in 12.1 seconds (12.1s async, 0.00s sync)
3 doctests, 29 tests, 5 failures

Randomized with seed 276120
----------------
COV    FILE                                        LINES RELEVANT   MISSED
100.0% lib/git_mock.ex                                55        7        0
 72.9% lib/gitea.ex                                  244       48       13
100.0% lib/helpers.ex                                133       14        0
100.0% lib/http.ex                                   135       24        0
 96.2% lib/httpoison_mock.ex                         164       26        1
[TOTAL]  88.2%
----------------
Generating report...
Saved to: cover/
FAILED: Expected minimum coverage of 100%, got 88.2%.

@nelsonic
Copy link
Member Author

I added a test in #13 which is now on main which means mix c with mock: false we get:

Finished in 21.1 seconds (21.1s async, 0.00s sync)
6 doctests, 30 tests, 0 failures

Randomized with seed 456290
----------------
COV    FILE                                        LINES RELEVANT   MISSED
100.0% lib/git_mock.ex                                55        7        0
100.0% lib/gitea.ex                                  244       48        0
100.0% lib/helpers.ex                                153       16        0
100.0% lib/http.ex                                   135       24        0
100.0% lib/httpoison_mock.ex                         164       26        0
[TOTAL] 100.0%
----------------
Generating report...
Saved to: cover/

@nelsonic
Copy link
Member Author

Getting this annoying error in the gitea-demo app:

[error] ERROR: GITEA_SSH_PORT Environment Variable is not set

until this PR is merged ... ⏳

Fixing the failing test. 🧑‍💻

@nelsonic
Copy link
Member Author

Tests fixed.

Test commits still being added to the parent repo.

image

@SimonLab please review when you're back from lunch. 🙏

@nelsonic nelsonic assigned SimonLab and unassigned nelsonic May 18, 2022
lib/gitea.ex Outdated Show resolved Hide resolved
test/gitea_test.exs Outdated Show resolved Hide resolved
test/gitea_test.exs Outdated Show resolved Hide resolved
test/gitea_test.exs Outdated Show resolved Hide resolved
@nelsonic
Copy link
Member Author

The IO.inspects are in the tests. they are noisy for now but aren't exported to the actual module. We can remove them later.

Copy link
Member

@SimonLab SimonLab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running tests work (mock true and false) on a fresh clone of Gitea.
The only question I have is linked to the Gitea.commit function using git add . -f
I've run the tests without the flag -f and it seems to work.

@nelsonic
Copy link
Member Author

@SimonLab review comments addressed. -f removed. New version in mix.exs and README.md.
Will publish to Hex.pm once you have reviewed/merged. Thanks. 👍

Copy link
Member

@SimonLab SimonLab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for cleaning the port related code

@SimonLab SimonLab merged commit 0c2bb0e into main May 19, 2022
@SimonLab SimonLab deleted the update-docs-issue-#1 branch May 19, 2022 21:41
@nelsonic
Copy link
Member Author

Package published to https://hex.pm/packages/gitea/1.0.3 📦 🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
in-review Issue or pull request that is currently being reviewed by the assigned person
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants