Skip to content

Strip some of the license coverage data if the report would be over the size limit. #46

Strip some of the license coverage data if the report would be over the size limit.

Strip some of the license coverage data if the report would be over the size limit. #46

Workflow file for this run

name: All tests
permissions: read-all
on:
push:
branches:
- main
- master
pull_request:
schedule:
- cron: "0 0 * * 0" # runs on every Sunday
env:
PUB_ENVIRONMENT: bot.github
DART_SDK_VERSION: '3.9.0'
jobs:
app_build_only:
name: app/ (build only)
runs-on: ubuntu-latest
steps:
- name: Cache PUB_CACHE
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684
with:
path: ~/.pub-cache
key: ${{runner.os}}-pub-cache
- name: Setup Dart SDK
uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
with:
sdk: ${{env.DART_SDK_VERSION}}
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- run: dart pub get
- name: Install webp
run: sudo apt-get update -yq && sudo apt-get install webp
- run: dart analyze --fatal-infos .
working-directory: app/
- run: dart format --output=none --set-exit-if-changed .
working-directory: app/
- run: dart test -P build-only -j 1
working-directory: app/
app_test:
name: app/ (shard ${{matrix.shard}})
strategy:
fail-fast: false
matrix:
shard: [0, 1, 2, 3, 4, 5, 6, 7]
runs-on: ubuntu-latest
steps:
- name: Cache PUB_CACHE
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684
with:
path: ~/.pub-cache
key: ${{runner.os}}-pub-cache
- name: Setup Dart SDK
uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
with:
sdk: ${{env.DART_SDK_VERSION}}
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- run: dart pub get
- name: Install webp
run: sudo apt-get update -yq && sudo apt-get install webp
- run: dart test -P presubmit --shard-index ${{matrix.shard}} --total-shards 8
working-directory: app/
define_pkg_list:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.packages.outputs.packages }}
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: List packages
id: packages
run: |
DIRS=$(find . -maxdepth 1 -mindepth 1 -type d -printf '"%f"\n' | tr '\n' ',' | sed 's/,$//')
echo "packages=[$DIRS]" >> $GITHUB_OUTPUT
working-directory: pkg/
test_packages:
name: pkg/${{matrix.package}}/
runs-on: ubuntu-latest
needs: define_pkg_list
strategy:
fail-fast: false
matrix:
package: ${{ fromJson(needs.define_pkg_list.outputs.packages) }}
steps:
- name: Cache PUB_CACHE
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684
with:
path: ~/.pub-cache
key: ${{runner.os}}-pub-cache
- name: Setup Dart SDK
uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
with:
sdk: ${{env.DART_SDK_VERSION}}
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- run: dart pub get
- run: dart analyze --fatal-infos .
working-directory: pkg/${{matrix.package}}
- run: dart format --output=none --set-exit-if-changed .
working-directory: pkg/${{matrix.package}}
- name: Check for test directory
id: check_test_dir
run: |
if [ -d "pkg/${{matrix.package}}/test" ]; then
echo "Test directory found for ${{matrix.package}}."
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "No test directory found for ${{matrix.package}}. Skipping tests."
echo "exists=false" >> $GITHUB_OUTPUT
fi
shell: bash
- name: Run tests
if: steps.check_test_dir.outputs.exists == 'true'
run: |
if [[ "${{ matrix.package }}" == "pub_integration" ]]; then
dart tool/trigger_puppeteer_download.dart
fi
dart test --run-skipped
working-directory: pkg/${{matrix.package}}