Treat errors in setup hooks as Global Errors in Allure Report #79
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 | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: | |
| - '**' | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| quality: | |
| name: Format and analyze | |
| runs-on: ubuntu-latest | |
| env: | |
| DART_SUPPRESS_ANALYTICS: 'true' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7.0.1 | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| - name: Install workspace dependencies | |
| run: dart pub get | |
| - name: Use workspace packages for Flutter adapter | |
| run: bash scripts/setup-flutter-workspace.sh | |
| - name: Install Flutter adapter dependencies | |
| working-directory: packages/allure_flutter_test | |
| run: flutter pub get | |
| - name: Check formatting | |
| run: > | |
| dart format --output=none --set-exit-if-changed | |
| packages/allure_dart_commons/lib | |
| packages/allure_dart_commons/test | |
| packages/allure_dart_test/lib | |
| packages/allure_dart_test/test | |
| packages/allure_flutter_test/lib | |
| packages/allure_flutter_test/test | |
| scripts | |
| - name: Analyze Dart workspace | |
| run: dart analyze | |
| - name: Analyze Flutter adapter | |
| working-directory: packages/allure_flutter_test | |
| run: flutter analyze --no-fatal-infos | |
| publish-dry-run: | |
| name: Publish dry-run | |
| runs-on: ubuntu-latest | |
| env: | |
| DART_SUPPRESS_ANALYTICS: 'true' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7.0.1 | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| - name: Publish dry-run | |
| run: bash scripts/publish-dry-run.sh | |
| build: | |
| name: Build (${{ matrix.name }}) | |
| runs-on: ${{ matrix.os }} | |
| needs: [quality, publish-dry-run] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: Ubuntu | |
| os: ubuntu-latest | |
| allure-env: ubuntu-dart-stable | |
| dump-name: allure-results-test-ubuntu | |
| chrome-smoke: true | |
| - name: Windows | |
| os: windows-latest | |
| allure-env: windows-dart-stable | |
| dump-name: allure-results-test-windows | |
| chrome-smoke: false | |
| env: | |
| ALLURE_MATRIX_ENV: ${{ matrix.allure-env }} | |
| ALLURE_TEST_DUMP_NAME: ${{ matrix.dump-name }} | |
| DART_SUPPRESS_ANALYTICS: 'true' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7.0.1 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: '24.x' | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| - name: Install workspace dependencies | |
| run: dart pub get | |
| - name: Use workspace packages for Flutter adapter tests | |
| run: bash scripts/setup-flutter-workspace.sh | |
| - name: Install Flutter adapter dependencies | |
| working-directory: packages/allure_flutter_test | |
| run: flutter pub get | |
| - name: Browser compile smoke | |
| if: ${{ !cancelled() }} | |
| shell: bash | |
| run: > | |
| dart compile js scripts/browser_compile_smoke.dart | |
| -o "${RUNNER_TEMP}/allure_commons_browser_smoke.js" | |
| - name: Set up Chrome | |
| id: setup-chrome | |
| if: ${{ !cancelled() && matrix.chrome-smoke }} | |
| uses: browser-actions/setup-chrome@v2 | |
| - name: Browser Chrome smoke | |
| if: ${{ !cancelled() && matrix.chrome-smoke }} | |
| working-directory: packages/allure_dart_commons | |
| shell: bash | |
| env: | |
| CHROME_EXECUTABLE: ${{ steps.setup-chrome.outputs.chrome-path }} | |
| run: dart test -p chrome test/platform_support_test.dart | |
| - name: Run commons tests with Allure | |
| if: ${{ !cancelled() }} | |
| working-directory: packages/allure_dart_commons | |
| shell: bash | |
| run: > | |
| npx -y allure@3 run | |
| --config "$GITHUB_WORKSPACE/allurerc.mjs" | |
| --rerun 2 | |
| --environment="${{ env.ALLURE_MATRIX_ENV }}" | |
| --dump="${{ env.ALLURE_TEST_DUMP_NAME }}-commons" | |
| -- dart test | |
| - name: Run package:test adapter tests with Allure | |
| if: ${{ !cancelled() }} | |
| working-directory: packages/allure_dart_test | |
| shell: bash | |
| run: > | |
| npx -y allure@3 run | |
| --config "$GITHUB_WORKSPACE/allurerc.mjs" | |
| --rerun 2 | |
| --environment="${{ env.ALLURE_MATRIX_ENV }}" | |
| --dump="${{ env.ALLURE_TEST_DUMP_NAME }}-dart-test" | |
| -- dart test | |
| - name: Run Flutter adapter tests with Allure | |
| if: ${{ !cancelled() }} | |
| working-directory: packages/allure_flutter_test | |
| shell: bash | |
| run: > | |
| npx -y allure@3 run | |
| --config "$GITHUB_WORKSPACE/allurerc.mjs" | |
| --rerun 2 | |
| --environment="${{ env.ALLURE_MATRIX_ENV }}" | |
| --dump="${{ env.ALLURE_TEST_DUMP_NAME }}-flutter-test" | |
| -- flutter test test | |
| - name: Upload Allure test dumps | |
| if: ${{ !cancelled() }} | |
| uses: actions/upload-artifact@v7.0.1 | |
| with: | |
| name: ${{ env.ALLURE_TEST_DUMP_NAME }} | |
| path: ./packages/**/${{ env.ALLURE_TEST_DUMP_NAME }}-*.zip | |
| report: | |
| needs: [build] | |
| name: Build report | |
| runs-on: ubuntu-latest | |
| if: ${{ !cancelled() }} | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| checks: write | |
| env: | |
| ALLURE_SERVICE_TOKEN: ${{ secrets.ALLURE_SERVICE_TOKEN }} | |
| ALLURE_TOKEN: ${{ secrets.ALLURE_TOKEN }} | |
| ALLURE_ENDPOINT: ${{ secrets.ALLURE_ENDPOINT }} | |
| ALLURE_PROJECT_ID: ${{ secrets.ALLURE_PROJECT_ID }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7.0.1 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version: '24.x' | |
| - name: Download Allure dumps | |
| uses: actions/download-artifact@v8 | |
| continue-on-error: true | |
| with: | |
| pattern: allure-results-* | |
| path: ./ | |
| merge-multiple: true | |
| - name: Generate Allure report | |
| run: > | |
| npx -y allure@3 generate | |
| --config ./allurerc.mjs | |
| --dump="./**/allure-results-*.zip" | |
| --output=./build/allure-report | |
| - name: Post Allure summary | |
| if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false | |
| uses: allure-framework/allure-action@v0 | |
| with: | |
| report-directory: ./build/allure-report | |
| github-token: ${{ secrets.GITHUB_TOKEN }} |