Skip to content
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

feature: add auto-build-and-test workflow for go #1019

Merged
merged 8 commits into from
Jan 12, 2024
Merged

Conversation

hpstory
Copy link
Contributor

@hpstory hpstory commented Jan 2, 2024

If this PR is related to coding or code translation, please fill out the checklist and paste the console outputs to the PR.

  • I've tested the code and ensured the outputs are the same as the outputs of reference code.
  • I've checked the code (formatting, comments, indentation, file header, etc) carefully.
  • The code does not rely on a particular environment or IDE and can be executed on a standard system (Win, macOS, Ubuntu).

@hpstory
Copy link
Contributor Author

hpstory commented Jan 2, 2024

The code in this PR was generated and modified by GPT. I tested it in my own forked repo and found the following issues that need help.

@hpstory
Copy link
Contributor Author

hpstory commented Jan 2, 2024

  • Go code get unexpected result when testing TestSpaceComplexity, workflow, log:
    1

@hpstory

This comment was marked as off-topic.

@hpstory

This comment was marked as off-topic.

@krahets
Copy link
Owner

krahets commented Jan 2, 2024

Thanks for the PR!

@Reanon @justin-tse @codingonion
Please help @hpstory test the workflow when you’re convenient, thanks!

@hpstory
Copy link
Contributor Author

hpstory commented Jan 2, 2024

Also fix Python Unicode Decode Error on Windows.
Before: workflow
1
After: workflow
2

@krahets krahets added the enhancement Brand new feature label Jan 2, 2024
@krahets
Copy link
Owner

krahets commented Jan 9, 2024

@hpstory Thanks for checking the testing result! The bug has been fixed.

=== RUN   TestSpaceComplexity
递归 n = 5
递归 n = 4
递归 n = 3
递归 n = 2
递归 n = 1
递归 n = 5 中的 nums 长度 = 5
递归 n = 4 中的 nums 长度 = 4
递归 n = 3 中的 nums 长度 = 3
递归 n = 2 中的 nums 长度 = 2
递归 n = 1 中的 nums 长度 = 1
                /———0
            /———0
           |    \———0
        /———0
       |   |    /———0
       |    \———0
       |        \———0
    /———0
   |   |        /———0
   |   |    /———0
   |   |   |    \———0
   |    \———0
   |       |    /———0
   |        \———0
   |            \———0
———0
   |            /———0
   |        /———0
   |       |    \———0
   |    /———0
   |   |   |    /———0
   |   |    \———0
   |   |        \———0
    \———0
       |        /———0
       |    /———0
       |   |    \———0
        \———0
           |    /———0
            \———0
                \———0
--- PASS: TestSpaceComplexity (0.00s)
PASS
ok      github.com/krahets/hello-algo/chapter_computational_complexity  0.520s

@krahets
Copy link
Owner

krahets commented Jan 9, 2024

  • Zig codes got compile errors, I'm not sure if it's a syntax error or if the wrong sdk version(0.11.0) was used. workflow, log:
    2

I would recommend merging the workflow file of Go and JS/TS first. They seem to be working fine.

Have you tried adding a bug to Go/JS/TS code to see if the workflow can report it?

@hpstory
Copy link
Contributor Author

hpstory commented Jan 9, 2024

  • Zig codes got compile errors, I'm not sure if it's a syntax error or if the wrong sdk version(0.11.0) was used. workflow, log:
    2

I would recommend merging the workflow file of Go and JS/TS first. They seem to be working fine.

Have you tried adding a bug to Go/JS/TS code to see if the workflow can report it?

No problem with Go. but JS and TS workflow actually did nothing, we need two scripts for build and test.
Capture

@krahets
Copy link
Owner

krahets commented Jan 10, 2024

  • Zig codes got compile errors, I'm not sure if it's a syntax error or if the wrong sdk version(0.11.0) was used. workflow, log:
    2

I would recommend merging the workflow file of Go and JS/TS first. They seem to be working fine.
Have you tried adding a bug to Go/JS/TS code to see if the workflow can report it?

No problem with Go. but JS and TS workflow actually did nothing, we need two scripts for build and test. Capture

I suggest merging the workflow of Go first. Let's open two new PRs for the JS/TS, Zig's workflow.

@hpstory hpstory changed the title [WIP]feature: add workflow for go/js/ts/zig feature: add workflow for go Jan 10, 2024
@hpstory
Copy link
Contributor Author

hpstory commented Jan 10, 2024

  • Zig codes got compile errors, I'm not sure if it's a syntax error or if the wrong sdk version(0.11.0) was used. workflow, log:
    2

I would recommend merging the workflow file of Go and JS/TS first. They seem to be working fine.
Have you tried adding a bug to Go/JS/TS code to see if the workflow can report it?

No problem with Go. but JS and TS workflow actually did nothing, we need two scripts for build and test. Capture

I suggest merging the workflow of Go first. Let's open two new PRs for the JS/TS, Zig's workflow.

Done

@krahets krahets changed the title feature: add workflow for go feature: add auto-build-and-test workflow for go Jan 12, 2024
Copy link
Owner

@krahets krahets left a comment

Choose a reason for hiding this comment

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

Thanks to @hpstory for the PR!

@krahets krahets merged commit b9ae4ff into krahets:main Jan 12, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Brand new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants