Skip to content

Commit

Permalink
ci: update and pin GHA to a commit hash (#1044)
Browse files Browse the repository at this point in the history
Co-authored-by: Manoel Aranda Neto <[email protected]>
  • Loading branch information
vaind and marandaneto authored Oct 4, 2022
1 parent 0d96d07 commit e390ced
Show file tree
Hide file tree
Showing 7 changed files with 195 additions and 201 deletions.
77 changes: 38 additions & 39 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,48 +27,47 @@ jobs:
- os: macos-latest
sdk: beta
steps:
- uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.sdk }}
- uses: actions/checkout@v3
# coverage with 'chrome' platform hangs the build
- name: Test (VM and browser)
if: runner.os != 'macOS'
run: |
dart pub get
dart test -p chrome --test-randomize-ordering-seed=random --chain-stack-traces
dart test -p vm --coverage=coverage --test-randomize-ordering-seed=random --chain-stack-traces
dart pub run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.dart_tool/package_config.json --report-on=lib
- uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d # pin@v1
with:
sdk: ${{ matrix.sdk }}
- uses: actions/checkout@v3
# coverage with 'chrome' platform hangs the build
- name: Test (VM and browser)
if: runner.os != 'macOS'
run: |
dart pub get
dart test -p chrome --test-randomize-ordering-seed=random --chain-stack-traces
dart test -p vm --coverage=coverage --test-randomize-ordering-seed=random --chain-stack-traces
dart pub run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.dart_tool/package_config.json --report-on=lib
- name: Install webdev
run: dart pub global activate webdev
- name: Install webdev
run: dart pub global activate webdev

- name: Build example
run: |
cd example
dart pub get
dart compile exe bin/example.dart
- name: Build example
run: |
cd example
dart pub get
dart compile exe bin/example.dart
# if condition because of: The pubspec.lock file has changed since the .dart_tool/package_config.json file was generated, please run "pub get" again.
- name: Build Web example
if: runner.os != 'Windows'
run: |
cd example_web
dart pub get
webdev build
# if condition because of: The pubspec.lock file has changed since the .dart_tool/package_config.json file was generated, please run "pub get" again.
- name: Build Web example
if: runner.os != 'Windows'
run: |
cd example_web
dart pub get
webdev build
- uses: codecov/codecov-action@v2
if: runner.os == 'Linux' && matrix.sdk == 'stable'
with:
name: sentry
files: ./dart/coverage/lcov.info
- uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # pin@v3
if: runner.os == 'Linux' && matrix.sdk == 'stable'
with:
name: sentry
files: ./dart/coverage/lcov.info

# 1.2.1
- uses: VeryGoodOpenSource/very_good_coverage@feed99cc060453828a8f12e74b404baace8e4502
if: runner.os == 'Linux' && matrix.sdk == 'stable'
with:
path: "./dart/coverage/lcov.info"
min_coverage: 85
- uses: VeryGoodOpenSource/very_good_coverage@feed99cc060453828a8f12e74b404baace8e4502 # [email protected]
if: runner.os == 'Linux' && matrix.sdk == 'stable'
with:
path: './dart/coverage/lcov.info'
min_coverage: 85

analyze:
runs-on: ubuntu-latest
Expand All @@ -77,7 +76,7 @@ jobs:
run:
working-directory: ./dart
steps:
- uses: dart-lang/setup-dart@v1
- uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d # pin@v1
with:
sdk: stable
- uses: actions/checkout@v3
Expand All @@ -91,7 +90,7 @@ jobs:
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- uses: axel-op/dart-package-analyzer@v3
- uses: axel-op/dart-package-analyzer@7a6c3c66bce78d82b729a1ffef2d9458fde6c8d2 # pin@v3
id: analysis
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
Expand Down
47 changes: 23 additions & 24 deletions .github/workflows/dio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,29 @@ jobs:
- os: macos-latest
sdk: beta
steps:
- uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.sdk }}
- uses: actions/checkout@v3
# coverage with 'chrome' platform hangs the build
- name: Test (VM and browser)
run: |
dart pub get
dart test -p chrome --test-randomize-ordering-seed=random --chain-stack-traces
dart test -p vm --coverage=coverage --test-randomize-ordering-seed=random --chain-stack-traces
dart pub run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.dart_tool/package_config.json --report-on=lib
- uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d # pin@v1
with:
sdk: ${{ matrix.sdk }}
- uses: actions/checkout@v3
# coverage with 'chrome' platform hangs the build
- name: Test (VM and browser)
run: |
dart pub get
dart test -p chrome --test-randomize-ordering-seed=random --chain-stack-traces
dart test -p vm --coverage=coverage --test-randomize-ordering-seed=random --chain-stack-traces
dart pub run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.dart_tool/package_config.json --report-on=lib
- uses: codecov/codecov-action@v2
if: runner.os == 'Linux' && matrix.sdk == 'stable'
with:
name: sentry_dio
files: ./dio/coverage/lcov.info
- uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # pin@v3
if: runner.os == 'Linux' && matrix.sdk == 'stable'
with:
name: sentry_dio
files: ./dio/coverage/lcov.info

# 1.2.1
- uses: VeryGoodOpenSource/very_good_coverage@feed99cc060453828a8f12e74b404baace8e4502
if: runner.os == 'Linux' && matrix.sdk == 'stable'
with:
path: "./dio/coverage/lcov.info"
min_coverage: 81
- uses: VeryGoodOpenSource/very_good_coverage@feed99cc060453828a8f12e74b404baace8e4502 # [email protected]
if: runner.os == 'Linux' && matrix.sdk == 'stable'
with:
path: './dio/coverage/lcov.info'
min_coverage: 81

analyze:
runs-on: ubuntu-latest
Expand All @@ -59,7 +58,7 @@ jobs:
run:
working-directory: ./dio
steps:
- uses: dart-lang/setup-dart@v1
- uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d # pin@v1
with:
sdk: stable
- uses: actions/checkout@v3
Expand All @@ -77,7 +76,7 @@ jobs:
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- uses: axel-op/dart-package-analyzer@v3
- uses: axel-op/dart-package-analyzer@7a6c3c66bce78d82b729a1ffef2d9458fde6c8d2 # pin@v3
id: analysis
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/e2e_dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ jobs:
matrix:
sdk: [stable, beta]
steps:
- uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.sdk }}
- uses: actions/checkout@v3
- name: Run
if: env.SENTRY_AUTH_TOKEN != null
run: |
dart pub get
dart run --define=SENTRY_ENVIRONMENT=e2e
- uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d # pin@v1
with:
sdk: ${{ matrix.sdk }}
- uses: actions/checkout@v3
- name: Run
if: env.SENTRY_AUTH_TOKEN != null
run: |
dart pub get
dart run --define=SENTRY_ENVIRONMENT=e2e
analyze:
runs-on: ubuntu-latest
Expand All @@ -43,7 +43,7 @@ jobs:
run:
working-directory: ./e2e_test
steps:
- uses: dart-lang/setup-dart@v1
- uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d # pin@v1
with:
sdk: stable
- uses: actions/checkout@v3
Expand Down
Loading

0 comments on commit e390ced

Please sign in to comment.