Update CI test execution steps #8
Workflow file for this run
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: Build and Test | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| php-integration-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Setup Helioviewer Docker environment | |
| uses: Helioviewer-Project/helioviewer.org-docker/.github/actions/helioviewer-docker@main | |
| with: | |
| api-ref: ${{ github.ref }} | |
| # Run tests inside the api container | |
| - name: Run phpunit tests | |
| working-directory: helioviewer.org-docker | |
| run: docker compose exec -T api composer run-script test | |
| - name: Run python tests | |
| working-directory: helioviewer.org-docker | |
| run: docker compose exec -T api composer run-script test-python | |
| - name: Print container logs | |
| if: always() | |
| working-directory: helioviewer.org-docker | |
| run: | | |
| docker compose logs | |
| - name: Print API error logs | |
| if: always() | |
| working-directory: helioviewer.org-docker | |
| run: | | |
| docker compose exec -T api ls -lh docroot/cache | |
| ls -lh data/cache | |
| cat data/log/* | |
| # playwright-e2e-tests: | |
| # strategy: | |
| # matrix: | |
| # shardIndex: [1, 2, 3, 4, 5] | |
| # shardTotal: [5] | |
| # # If one of the shards fails, continue running the remaining tests | |
| # fail-fast: false | |
| # | |
| # timeout-minutes: 60 | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - name: Run Playwright tests | |
| # uses: Helioviewer-Project/helioviewer.org-tests/.github/actions/playwright-test@main | |
| # with: | |
| # api-ref: ${{ github.sha }} | |
| # shard-index: ${{ matrix.shardIndex }} | |
| # shard-total: ${{ matrix.shardTotal }} | |
| # merge-reports: | |
| # # Merge reports after playwright-tests, even if some shards have failed | |
| # if: ${{ !cancelled() }} | |
| # needs: [playwright-e2e-tests] | |
| # | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - name: Checkout test code | |
| # uses: actions/checkout@v4 | |
| # with: | |
| # repository: 'Helioviewer-Project/helioviewer.org-tests' | |
| # path: 'helioviewer.org-tests' | |
| # | |
| # - name: Merge Playwright reports | |
| # uses: Helioviewer-Project/helioviewer.org-tests/.github/actions/playwright-merge-reports@main | |
| # with: | |
| # test-repo-path: 'helioviewer.org-tests' |