Skip to content

Commit

Permalink
caching
Browse files Browse the repository at this point in the history
  • Loading branch information
j4qfrost committed Feb 21, 2024
1 parent ad5f0bd commit e8207e3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ jobs:
run: |
dart pub cache add postgres
dart pub global activate melos
melos bootstrap
dart pub global activate -spath packages/cli
dart pub cache clear
melos bootstrap
melos cache-source
- name: Run tests
working-directory: ../
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ jobs:
run: |
dart pub cache add postgres
dart pub global activate melos
melos bootstrap
dart pub global activate -spath packages/cli
dart pub cache clear
melos bootstrap
melos cache-source
- name: Run tests
working-directory: ../
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ jobs:
run: |
dart pub cache add postgres
dart pub global activate melos
dart pub global run melos:melos bootstrap
dart pub global activate -spath packages/cli
dart pub cache clear
melos bootstrap
dart pub global run melos:melos cache-source-win
- name: Run tests
working-directory: ../
Expand Down
11 changes: 3 additions & 8 deletions packages/runtime/test/context_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,21 @@ void main() {
late BuildContext ctx;

setUpAll(() async {
String cmd;
if (Platform.isWindows) {
cmd = (await Process.run("where", ["pub.bat"])).stdout as String;
} else {
cmd = (await Process.run("which", ["pub"])).stdout as String;
}
String cmd = 'dart';

final testPackagesUri =
Directory.current.uri.resolve("../").resolve("runtime_test_packages/");
await Process.run(
cmd,
["get", "--offline"],
["pub", "get", "--offline"],
workingDirectory: testPackagesUri
.resolve("application/")
.toFilePath(windows: Platform.isWindows),
runInShell: true,
);
await Process.run(
cmd,
["get", "--offline"],
["pub", "get", "--offline"],
workingDirectory: testPackagesUri
.resolve("dependency/")
.toFilePath(windows: Platform.isWindows),
Expand Down

0 comments on commit e8207e3

Please sign in to comment.