name: {{ name }} on: push: branches: - {{ branch }} pull_request: branches: - {{ branch }} jobs: reuse: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: REUSE Compliance Check uses: fsfe/reuse-action@v1 checkstyle: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v2 with: python-version: '3.9' - uses: actions/setup-java@v1 with: java-version: '15.0.x' architecture: x64 - name: Check lints run: | mvn checkstyle:check - name: Create report run: | mvn site - name: Upload report uses: actions/upload-artifact@v3 with: name: java-lints-report path: ~/target/site static-code-analysis: env: RCA_LINK: https://github.com/mozilla/rust-code-analysis/releases/download RCA_VERSION: v0.0.25 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Install rust-code-analysis run: | mkdir -p $HOME/.local/bin curl -L "$RCA_LINK/$RCA_VERSION/rust-code-analysis-linux-cli-x86_64.tar.gz" | tar xz -C $HOME/.local/bin echo "$HOME/.local/bin" >> $GITHUB_PATH - name: Run rust-code-analysis run: | mkdir $HOME/rca-json rust-code-analysis-cli --metrics -O json --pr -o "$HOME/rca-json" -p $PWD - name: Upload rust-code-analysis json uses: actions/upload-artifact@v3 with: name: rca-json path: ~/rca-json build: needs: [reuse, checkstyle, static-code-analysis] runs-on: ubuntu-latest strategy: matrix: java-version: [ '8.0.x', '9.0.x', '10.0.x', '11.0.x', '12.0.x', '13.0.x', '14.0.x', '15.0.x', ] steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v2 with: python-version: '3.9' - uses: actions/setup-java@v1 with: java-version: {{ '${{ matrix.java-version }}' }} architecture: x64 - name: Run integration tests bash: shell run: | mvn clean compile \ org.jacoco:jacoco-maven-plugin:0.8.6:prepare-agent \ install org.jacoco:jacoco-maven-plugin:0.8.6:report - name: Deploy Jacoco code coverage reports to gh-pages if: matrix.java-version == '15.0.x' uses: JamesIves/github-pages-deploy-action@v4 with: clean: true folder: target/site/jacoco target-folder: reports branch: gh-pages