chore: sync with microG unofficial installer #174
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
| --- | |
| # SPDX-FileCopyrightText: NONE | |
| # SPDX-License-Identifier: CC0-1.0 | |
| name: "Coverage" | |
| permissions: {} | |
| on: | |
| push: | |
| paths-ignore: | |
| - ".github/**" | |
| - ".gitlab/**" | |
| - ".gitlab-ci.yml" | |
| - ".travis.yml" | |
| branches: | |
| - "**" | |
| tags: | |
| - "v*.*" | |
| pull_request: | |
| jobs: | |
| coverage: | |
| name: "Coverage" | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| concurrency: | |
| group: "${{ github.repository_id }}-${{ github.workflow }}-coverage" | |
| cancel-in-progress: false | |
| permissions: | |
| contents: read # Needed to checkout the repository (only required for private repositories) | |
| steps: | |
| - name: "Checkout sources" | |
| uses: actions/checkout@v6 | |
| with: | |
| lfs: false | |
| - name: "Setup Java" | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: "temurin" | |
| java-version-file: ".tool-versions" | |
| - name: "Setup Ruby" | |
| uses: ruby/setup-ruby@v1 | |
| timeout-minutes: 10 | |
| with: | |
| ruby-version: "3.4" | |
| bundler-cache: "true" | |
| - name: "Use build cache" | |
| uses: actions/cache/restore@v5 | |
| timeout-minutes: 5 | |
| with: | |
| key: "build-${{ hashFiles('conf/conf-full.inc.sh') }}" | |
| restore-keys: "build-" | |
| path: "cache/build" | |
| enableCrossOsArchive: true | |
| - name: "Use LFS cache" | |
| uses: actions/cache/restore@v5 | |
| timeout-minutes: 5 | |
| with: | |
| key: "lfs-${{ hashFiles('conf/conf-lfs.inc.sh') }}" | |
| restore-keys: "lfs-" | |
| path: "cache/lfs" | |
| enableCrossOsArchive: true | |
| - name: "Build (with coverage)" | |
| id: "build" | |
| shell: bash | |
| timeout-minutes: 10 | |
| run: | | |
| # Executing code coverage... | |
| export BUILD_TYPE=oss | |
| #sudo apt-get -qq -y install moreutils 1>/dev/null | |
| bundle exec bashcov '${{ github.workspace }}/build.sh' # To timestamp the output pipe it to: TZ=UTC ts '[%H:%M:%S]' | |
| - name: "Testing (with coverage)" | |
| shell: bash | |
| timeout-minutes: 10 | |
| if: "${{ steps.build.outputs.ZIP_BUILD_TYPE_SUPPORTED == 'true' }}" | |
| run: | | |
| # Testing of zip installation... | |
| echo '===========================' | |
| echo 'TESTING OF ZIP INSTALLATION' | |
| echo '===========================' | |
| bundle exec bashcov '${{ github.workspace }}/recovery-simulator/recovery.sh' '${{ steps.build.outputs.ZIP_FOLDER }}/${{ steps.build.outputs.ZIP_FILENAME }}' | |
| printf '\n' | |
| echo '===============' | |
| echo 'RECOVERY OUTPUT' | |
| echo '===============' | |
| if test -e '${{ github.workspace }}/recovery-simulator/output/recovery-output.log'; then | |
| cat '${{ github.workspace }}/recovery-simulator/output/recovery-output.log' | |
| fi | |
| printf '\n' | |
| echo '===============' | |
| echo 'INSTALLED FILES' | |
| echo '===============' | |
| if test -e '${{ github.workspace }}/recovery-simulator/output/installed-files.log'; then | |
| cat '${{ github.workspace }}/recovery-simulator/output/installed-files.log' | |
| fi | |
| - name: "Verify Codecov token" | |
| id: "codecov-token" | |
| shell: bash | |
| env: | |
| CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}" | |
| run: | | |
| # Verifying token... | |
| if test -n "${CODECOV_TOKEN?}"; then token_set='true'; else token_set='false'; fi | |
| printf 'TOKEN_SET=%s\n' "${token_set:?}" 1>> "${GITHUB_OUTPUT?}" | |
| - name: "Upload coverage reports to Codecov" | |
| if: "${{ steps.codecov-token.outputs.TOKEN_SET == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}" | |
| uses: codecov/codecov-action@v6 | |
| timeout-minutes: 10 | |
| with: | |
| fail_ci_if_error: true | |
| token: "${{ secrets.CODECOV_TOKEN }}" | |
| - name: "Verify Codacy token" | |
| id: "codacy-token" | |
| shell: bash | |
| env: | |
| CODACY_TOKEN: "${{ secrets.CODACY_PROJECT_TOKEN }}" | |
| run: | | |
| # Verifying token... | |
| if test -n "${CODACY_TOKEN?}"; then token_set='true'; else token_set='false'; fi | |
| printf 'TOKEN_SET=%s\n' "${token_set:?}" 1>> "${GITHUB_OUTPUT?}" | |
| - name: "Upload coverage reports to Codacy" | |
| if: "${{ steps.codacy-token.outputs.TOKEN_SET == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}" | |
| uses: codacy/codacy-coverage-reporter-action@v1 | |
| timeout-minutes: 10 | |
| with: | |
| project-token: "${{ secrets.CODACY_PROJECT_TOKEN }}" |