Disabling editable code areas in McdaBot #75
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Java CI with Gradle | |
| on: | |
| push: | |
| branches: [ "main", "dev", "dev-darco" ] | |
| pull_request: | |
| branches: [ "main", "dev", "dev-darco" ] | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Use Microsoft JDK 21 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'microsoft' | |
| # Configure Gradle | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 | |
| # Build the project | |
| - name: Build with Gradle | |
| run: ./gradlew build | |
| # Run tests and verify all JUnit 5 tests pass | |
| - name: Run and verify tests | |
| run: | | |
| ./gradlew test | |
| # Verify test results | |
| if grep -q "FAILURE" build/test-results/test/TEST-*.xml; then | |
| echo "::error::Some tests failed" | |
| exit 1 | |
| fi | |
| echo "All tests passed successfully" |