Create is.tt (#1498) #2363
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: citest | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| debug_enabled: | |
| type: boolean | |
| description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | |
| required: false | |
| default: false | |
| env: | |
| THRUK_TEST_MODULES_CACHE: /tmp/thruk_test_modules_cache | |
| THRUK_CRITIC_CACHE_FILE: /tmp/thruk_critic_cache_file | |
| jobs: | |
| citest: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: perl -V | |
| run: perl -V | |
| - name: Setup tmate session, see https://github.com/marketplace/actions/debugging-with-tmate | |
| uses: mxschmitt/action-tmate@v3 | |
| if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | |
| - uses: abbbi/github-actions-tune@v1 | |
| - name: prepare machine | |
| uses: nick-fields/retry@v4 | |
| with: | |
| max_attempts: 3 | |
| timeout_minutes: 30 | |
| retry_wait_seconds: 180 | |
| command: | | |
| timeout -v 5m sudo bash -x ./.ci/prepare_machine.sh | |
| - name: install dependencies | |
| uses: nick-fields/retry@v4 | |
| with: | |
| max_attempts: 3 | |
| timeout_minutes: 30 | |
| retry_wait_seconds: 180 | |
| command: | | |
| chmod o+x /home/runner/ | |
| timeout -v 5m sudo su naemon -c 'bash -x ./.ci/install_deps.sh' | |
| - name: install puppeteer | |
| uses: nick-fields/retry@v4 | |
| with: | |
| max_attempts: 3 | |
| timeout_minutes: 30 | |
| retry_wait_seconds: 180 | |
| command: | | |
| timeout -v 2m sudo bash -x ./script/install_puppeteer.sh | |
| - name: free some disk space | |
| run: | | |
| # remove unused images | |
| timeout -v 15m sudo bash -x ./.ci/docker_clean_safe.sh | |
| # remove unrelated large sdk | |
| sudo rm -rf /usr/local/lib/android | |
| df -h | |
| - name: restore cache files | |
| id: thruk-test-cache-restore | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: | | |
| ${{ env.THRUK_TEST_MODULES_CACHE }} | |
| ${{ env.THRUK_CRITIC_CACHE_FILE }} | |
| key: thruk-test-cache | |
| - name: make cache files writable | |
| run: | | |
| sudo chown -R naemon: ${{ env.THRUK_TEST_MODULES_CACHE }} ${{ env.THRUK_CRITIC_CACHE_FILE }} || : | |
| ls -la ${{ env.THRUK_TEST_MODULES_CACHE }} ${{ env.THRUK_CRITIC_CACHE_FILE }} || : | |
| - name: make quicktest | |
| run: | | |
| timeout -v 10m sudo su naemon -c 'eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) && THRUK_TEST_MODULES_CACHE=${{ env.THRUK_TEST_MODULES_CACHE }} THRUK_CRITIC_CACHE_FILE=${{ env.THRUK_CRITIC_CACHE_FILE }} HARNESS_TIMER=1 stdbuf -o0 -e0 make quicktest' | |
| - name: make citest | |
| run: | | |
| timeout -v 90m sudo su naemon -c 'eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) && THRUK_TEST_MODULES_CACHE=${{ env.THRUK_TEST_MODULES_CACHE }} THRUK_CRITIC_CACHE_FILE=${{ env.THRUK_CRITIC_CACHE_FILE }} HARNESS_TIMER=1 stdbuf -o0 -e0 make citest' | |
| - name: remove cache | |
| if: ${{ github.event_name == 'push' && github.repository == 'sni/thruk' && github.ref == 'refs/heads/main' }} | |
| run: | | |
| echo "event_name: ${{ github.event_name }}" | |
| echo "ref: ${{ github.ref }}" | |
| echo "base_ref: ${{ github.base_ref }}" | |
| echo "head_ref: ${{ github.head_ref }}" | |
| gh cache delete --all | |
| ls -la ${{ env.THRUK_TEST_MODULES_CACHE }} ${{ env.THRUK_CRITIC_CACHE_FILE }} || : | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| - name: save updated cache back | |
| if: ${{ github.event_name == 'push' && github.repository == 'sni/thruk' && github.ref == 'refs/heads/main' }} | |
| id: thruk-test-cache-save | |
| uses: actions/cache/save@v5 | |
| with: | |
| path: | | |
| ${{ env.THRUK_TEST_MODULES_CACHE }} | |
| ${{ env.THRUK_CRITIC_CACHE_FILE }} | |
| key: thruk-test-cache |