diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..6da8cf9 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: +- package-ecosystem: maven + directory: "/" + schedule: + interval: "daily" + open-pull-requests-limit: 10 diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml new file mode 100644 index 0000000..8982dc7 --- /dev/null +++ b/.github/workflows/analyze.yml @@ -0,0 +1,32 @@ +name: Analyze + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + analyze: + + strategy: + matrix: + profile: ['checkerframework', 'errorprone'] + + runs-on: ubuntu-latest + env: + BUILD_NUMBER: "${{github.run_number}}" + MAVEN_CLI_OPTS: "-s .m2/settings.xml --batch-mode --no-transfer-progress" + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 21 + uses: actions/setup-java@v3 + with: + java-version: '21' + distribution: 'temurin' + cache: 'maven' + - name: Install maven modules + run: ./mvnw $MAVEN_CLI_OPTS install -Dmaven.javadoc.skip -DskipTests -Dmaven.source.skip=true + - name: Analyze with ${{ matrix.profile }} + run: bin/analyze.sh ${{ matrix.profile }} diff --git a/.github/workflows/apidoc.yml b/.github/workflows/apidoc.yml new file mode 100644 index 0000000..4953fb9 --- /dev/null +++ b/.github/workflows/apidoc.yml @@ -0,0 +1,49 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Pages + uses: actions/configure-pages@v2 + - name: Set up JDK 21 + uses: actions/setup-java@v3 + with: + java-version: '21' + distribution: 'temurin' + - name: mvn install + run: ./mvnw --batch-mode --no-transfer-progress -Pdoc clean install -DskipTests=true + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + # Upload entire repository + path: 'target/reports/apidocs' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1 diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000..1788751 --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,47 @@ +name: Build with Maven + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + build: + + runs-on: ubuntu-latest + env: + BUILD_NUMBER: "${{github.run_number}}" + MAVEN_CLI_OPTS: "-s .m2/settings.xml --batch-mode --no-transfer-progress" + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 21 + uses: actions/setup-java@v3 + with: + java-version: '21' + distribution: 'temurin' + - name: Cache local Maven repository + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Build and Test with Maven + run: ./mvnw $MAVEN_CLI_OPTS clean verify + - name: Upload Test Results + uses: actions/upload-artifact@v3 + if: always() + with: + name: test-results + path: '**/target/surefire-reports/TEST-*.xml' + # - name: Upload coverage reports to Codecov + # uses: codecov/codecov-action@v4 + # with: + # token: ${{ secrets.CODECOV_TOKEN }} + # slug: jstachio/rainbowgum + # fail_ci_if_error: true + # disable_search: true + # files: ${{ github.workspace }}/rainbowgum/target/site/jacoco-aggregate/jacoco.xml diff --git a/.github/workflows/test-report.yml b/.github/workflows/test-report.yml new file mode 100644 index 0000000..66bba61 --- /dev/null +++ b/.github/workflows/test-report.yml @@ -0,0 +1,16 @@ +name: 'Test Report' +on: + workflow_run: + workflows: ['Build with Maven'] + types: + - completed +jobs: + report: + runs-on: ubuntu-latest + steps: + - uses: dorny/test-reporter@v1 + with: + artifact: test-results + name: Maven Surefire Tests + path: '**/target/surefire-reports/TEST-*.xml' + reporter: java-junit \ No newline at end of file diff --git a/.m2/settings.xml b/.m2/settings.xml new file mode 100644 index 0000000..3369241 --- /dev/null +++ b/.m2/settings.xml @@ -0,0 +1,21 @@ + + + github + + + + github + ${env.GITHUB_ACTOR} + ${env.GITHUB_TOKEN} + + + + + github + + true + true + + + +