Skip to content

Commit

Permalink
cache in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
vaind committed Nov 8, 2024
1 parent af304d9 commit 32a8e29
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ jobs:
distribution: 'temurin'
java-version: '17'

- run: env
- uses: actions/cache@v4
with:
path: temp/testapp-${{ matrix.target }}
key: integration-test-${{ matrix.host }}-${{ matrix.target }}

- run: dart test --tags integration
26 changes: 13 additions & 13 deletions test/integration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@ import 'package:test/test.dart';
const appName = 'testapp';
late final String serverUri;

// Platforms to be tested are either coming from the CI env var or
// we test everything that is possible to test on this machine.
final testPlatforms = Platform.environment.containsKey('TEST_PLATFORM')
? [Platform.environment['TEST_PLATFORM']!]
: [
'android',
if (Platform.isMacOS) 'macos',
if (Platform.isMacOS) 'ios',
if (Platform.isWindows) 'windows',
if (Platform.isLinux) 'linux',
'web'
];

// NOTE: Don't run/debug this main(), it likely won't work.
// You can use main() in `sentry_native_test.dart`.
void main() async {
Expand All @@ -21,19 +34,6 @@ void main() async {
: Directory.current;
final tempDir = Directory('${repoRootDir.path}/temp');

// Platforms to be tested are either coming from the CI env var or
// we test everything that is possible to test on this machine.
final testPlatforms = bool.hasEnvironment('TEST_PLATFORM')
? [String.fromEnvironment('TEST_PLATFORM')]
: [
'android',
if (Platform.isMacOS) 'macos',
if (Platform.isMacOS) 'ios',
if (Platform.isWindows) 'windows',
if (Platform.isLinux) 'linux',
'web'
];

late Process testServer;
late Future<Map<String, int>> Function() stopServer;
setUp(() async {
Expand Down

0 comments on commit 32a8e29

Please sign in to comment.