diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..681e088f851506db37f7b6c515b6c633dd389d63 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,35 @@ +#Workflow name +name: CI/CD Pipeline +on: + #Manually trigger workflow runs + workflow_dispatch: + #Trigger the workflow on push from the main branch + push: + branches: + - main +jobs: + #Test's job + tests: + name: Unit tests + #Run on Ubuntu using the latest version + runs-on: ubuntu-latest + #Job's steps + steps: + #Check-out your repository under $GITHUB_WORKSPACE, so your workflow can access it + - uses: actions/checkout@v1 + #Set up JDK 11 + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: '20' + #Set up Maven cache + - name: Cache Maven packages + #This action allows caching dependencies and build outputs to improve workflow execution time. + uses: actions/cache@v1 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + #Run Tests + - name: Run Tests + run: mvn -B test \ No newline at end of file