Skip to content

Commit 2463dcd

Browse files
committed
Upload generated asset hashes
1 parent d059ee5 commit 2463dcd

File tree

1 file changed

+38
-6
lines changed

1 file changed

+38
-6
lines changed

.github/workflows/main.yml

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,33 +69,31 @@ jobs:
6969
- uses: dart-lang/setup-dart@v1
7070
with:
7171
sdk: ${{ matrix.dart }}
72-
7372
- name: Download compiled sqlite3
7473
if: matrix.sqlite == 'compiled'
7574
uses: actions/download-artifact@v5
7675
with:
7776
artifact-ids: ${{ needs.fetch_sqlite.outputs.artifact_id }}
7877
path: sqlite/out
79-
8078
- uses: actions/cache@v4
8179
with:
8280
path: "${{ env.PUB_CACHE }}"
8381
key: dart-dependencies-${{ matrix.dart }}-${{ runner.os }}
8482
restore-keys: |
8583
dart-dependencies-${{ matrix.dart }}-
8684
dart-dependencies-
87-
85+
- name: Get Dart dependencies
86+
run: |
87+
dart pub get
8888
- name: Write asset hashes
8989
run: dart run tool/write_asset_hashes.dart
9090
if: matrix.sqlite == 'compiled'
91-
9291
- name: Prepare for tests
9392
run: |
9493
dart run tool/hook_overrides.dart ${{ matrix.sqlite }}
9594
9695
- name: Test sqlite3 package
9796
run: |
98-
dart pub get
9997
dart test --test-randomize-ordering-seed "random" -P ci
10098
working-directory: sqlite3/
10199

@@ -112,7 +110,6 @@ jobs:
112110
- name: Test sqlite3_test package
113111
if: matrix.sqlite != 'system' || runner.os != 'Windows'
114112
run: |
115-
dart pub get
116113
dart test
117114
working-directory: sqlite3_test/
118115

@@ -125,6 +122,41 @@ jobs:
125122
if: matrix.sqlite == 'compiled' && runner.os == 'Linux'
126123
working-directory: sqlite3/
127124

125+
upload_asset_hashes:
126+
needs: [test, fetch_sqlite]
127+
runs-on: ubuntu-latest
128+
steps:
129+
- uses: actions/checkout@v5
130+
- uses: dart-lang/setup-dart@v1
131+
with:
132+
sdk: ${{ matrix.dart }}
133+
- name: Download compiled sqlite3
134+
uses: actions/download-artifact@v5
135+
with:
136+
artifact-ids: ${{ needs.fetch_sqlite.outputs.artifact_id }}
137+
path: sqlite/out
138+
- uses: actions/cache@v4
139+
with:
140+
path: "${{ env.PUB_CACHE }}"
141+
key: dart-dependencies-${{ matrix.dart }}-${{ runner.os }}
142+
restore-keys: |
143+
dart-dependencies-${{ matrix.dart }}-
144+
dart-dependencies-
145+
- name: Get Dart dependencies
146+
run: |
147+
dart pub get
148+
- name: Write asset hashes
149+
run: dart run tool/write_asset_hashes.dart
150+
- name: Upload asset hashes
151+
uses: actions/upload-artifact@v4
152+
id: upload
153+
with:
154+
name: asset-hashes
155+
path: sqlite3/lib/src/hook/asset_hashes.dart
156+
if-no-files-found: error
157+
retention-days: 1
158+
159+
128160
# The integration tests for android are currently broken (the emulator doesn't want to
129161
# start up...)
130162
#

0 commit comments

Comments
 (0)