File tree 2 files changed +27
-19
lines changed
2 files changed +27
-19
lines changed Original file line number Diff line number Diff line change @@ -10,16 +10,14 @@ jobs:
10
10
build :
11
11
runs-on : ubuntu-latest
12
12
13
- # Note that this workflow uses the latest stable version of the Dart SDK.
14
- # Docker images for other release channels - like dev and beta - are also
15
- # available. See https://hub.docker.com/r/google/dart/ for the available
16
- # images.
17
- container :
18
- image : dart:beta
19
-
20
13
steps :
21
14
- uses : actions/checkout@v4
22
-
15
+
16
+ - name : Setup Dart
17
+ uses : dart-lang/setup-dart@v1
18
+ with :
19
+ sdk : beta
20
+
23
21
- name : Print Dart SDK version
24
22
run : dart --version
25
23
@@ -36,15 +34,14 @@ jobs:
36
34
- name : Run VM tests
37
35
run : dart test -p vm
38
36
39
- # Tests on Chrome
40
- - name : Install Chrome
41
- run : |
42
- apt-get update
43
- apt-get install -y wget gnupg
44
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
45
- echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list
46
- apt-get update
47
- apt-get install -y google-chrome-stable
48
-
37
+ # Tests on Chrome - using browser-tools setup action
38
+ - name : Setup Chrome
39
+ uses : browser-actions/setup-chrome@latest
40
+ with :
41
+ chrome-version : stable
42
+
49
43
- name : Run Chrome tests
50
- run : dart test -p chrome --chrome-flags="--no-sandbox"
44
+ run : |
45
+ # Use DART_TEST_CHROME_OPTIONS instead of CHROME_FLAGS
46
+ export DART_TEST_CHROME_OPTIONS="--no-sandbox --disable-gpu --headless --disable-dev-shm-usage"
47
+ dart test -p chrome
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Set Chrome options to match the GitHub workflow configuration
4
+ export DART_TEST_CHROME_OPTIONS=" --no-sandbox --disable-gpu --headless --disable-dev-shm-usage"
5
+
6
+ # Run the tests with Chrome platform
7
+ echo " Running Chrome tests with DART_TEST_CHROME_OPTIONS: $DART_TEST_CHROME_OPTIONS "
8
+ dart test -p chrome
9
+
10
+ # Exit with the test command's exit code
11
+ exit $?
You can’t perform that action at this time.
0 commit comments