I'm trying to figure out how to use gitlab CI/CD with my maven java project and the yml-file. So first I tried to find the command, for example in javascript you have npm run test
and it'll run the tests. But I can't seem to find the equivalent.
My yml-file:
stages: ["build", "test"]
build:
stage: build
script:
- echo "Building..."
- mkdir build
- new-item build/info.txt
artifacts:
paths:
- build/
test:
stage: test
script:
- echo "Testing..."
- Test-Path "build/info.txt" -PathType leaf
mkdir build
basically makes a directory and builds it, right? It's hard to find the commands that automatically build the project and tests the project...anybody got any suggestions?
I am not sure what terminal I'm using in Intellij since 'mvn' was not recognized as an internal or external command
, so I'm pretty sure I'm using powershell.
If I click on the side-maven button and run the verify it does work, but why doesn't mvn verify
work in the terminal?