Skip to content

Delete multiple polls votes #4

Delete multiple polls votes

Delete multiple polls votes #4

name: Build and Test
on:
pull_request:
branches:
- main
paths-ignore:
- "**/README.md"
types: [opened, synchronize, reopened]
workflow_dispatch:
jobs:
build-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0 # Fetch all history for better caching
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "adopt"
cache: maven
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn clean install -T 4 # Build with 4 threads
- name: Run unit tests
run: mvn test
- name: Upload test results
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: test-results
path: target/surefire-reports