how do I run a test with "go cache" while using goland - goland

Every time I run a test with goland,it builds too slow.
It sames not using "go cache".
I have tried building with "-i" , but not usefully

Related

Execute R script with hotkey

Let's assume I have an R script located in C:\Users\user\myscript.R. How can I assign a hotkey (e.g., F1) so that every time that I press that hotkey the R script will be executed in the background (i.e., without opening Rstudio)?
Note:
I use Windows 10 and have AutoHotkey installed which might help to bind the script to the key.
This solution involves three steps:
1) Create a .bat file that executes the R script (as suggested by Daniel O):
runscript.bat (located in C:\Users\user\runscript.bat)
"C:\Program Files\R\R-4.0.0\bin\R.exe" CMD BATCH "C:\Users\user\myscript.R"
2) Bind the .bat script to the Home hotkey with the open-source software AutoHotkey by creating a .ahk script (as suggested by D. Pardal):
bindscript.ahk (located in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp so it will automatically load-up on start-up, see this)
Home::Run, runscript.bat, C:\Users\user
3) Set environment variable for R on windows 10 following this tutorial.
press win+r, type "shell:startup", and press enter. It should bring up file explorer. There, you can create a different script and write this inside it:
F1::
Run, C:\Users\user\myscript.R
This will make the trigger script run at startup, so that whenever you press f1, myscript.r will run

Run unit tests on git push and integration tests on pull request

When building R packages, we use testthat to write tests. We have 2 files: a test file for the specific package (specific.R), and one that we use to make sure all packages continue to work together and the overall result is fine (overall.R). Both tests are currently run when we push to github or create a PR through Travis, which implicitly runs this line of code(R CMD check *tar.gz). check runs all the tests in the test folder, and thus both files are run.
Now, I'm a bit new to testing... but it seems that we have more or less recreated the difference b/w a unit test and an integration test.
Considering that the tests for overall.R do take a lot longer to run, we would like to restrict it so that they only run when we do a pull-request to the package (when we have introduced new functionality on a different dev branch) while the package-specific tests keep running every time we commit/push to the repo.
Is this possible in github or Travis?
You could put your overall.R script into a different directory and then specify this folder as the new tests directory for pull-request hooks, but this will then only run your integration tests and not the unit tests. See R CMD check --help
R CMD check --test-dir integration_tests package.tar.gz

Running QTests from CLion

Is it possible to run all QTests from the CLion Test Runner?
I have a CMake file that creates one target per Test Class, which ends up in several test targets that I can run one by one from CLion, but I haven't figured out how to run them all at once.
CMake has the "test" target, which I can build with "make test" from the test directory, but this target is not listed in CLion.

How to run sbt multiple command in interactive mode

I want to run several sbt-commands within sbt interactive mode, i.e. without leaving the sbt "shell"?
(Note:
Some questions answer how to pass argument to sbt-commands using sbt in the standard shell. Not what I wnat here)
Example: I am in sbt interactive shell, and I want to run "test:compile", then "test"
I know test will call required compilation, but in this example I want to run the compilation of all sub-projects, before any test is started.
To run commands sequentially within the sbt shell, use ; to chain commands:
> ;test:compile ;test
Note however that running the test task will compile your sources if necessary without you having to explicitly running the compile task.

Running a python .py file on Jetbrain Pycharm

I write my .py files using Pycharm JetBrains editors. When I run my codes, the output is shown in a console entitled "Run", without any prompt. Therefore, I dont have access to the variables of my code output. How can I force the pycharm to show the output of my codes in ipython console?
You can edit the Run Configuration and check the box "Show command line afterwards". This will run your script, but leave you in an interactive prompt. Everything from your script will have been imported and available.
As a note, if you install the IPython package (Preferences -> Project -> Project Interpreter, click + to add packages) then you can get a nicer console interpreter.
Finally, a different way to accomplish what you are looking for: run under Debug rather than Run. You can set a breakpoint and then use the debugger's Console right at the line you might be interested in.

Resources