File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Unit Tests
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
10+
11+ jobs :
12+ test :
13+ name : Unit Testing
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : π Checkout code
18+ uses : actions/checkout@v3
19+
20+ - name : π¦ Set up Dart
21+ uses : dart-lang/setup-dart@v1
22+ with :
23+ sdk : stable
24+
25+ - name : π¦ Install dependencies
26+ run : dart pub get
27+
28+ - name : π§ͺ Run Tests
29+ run : dart test -r json > test-results.json
30+ continue-on-error : true
31+
32+ - name : π Upload Test Results
33+ uses : actions/upload-artifact@v4.6.2
34+ with :
35+ name : test-results
36+ path : test-results.json
37+
38+ - name : π Check Test Results
39+ run : |
40+ if grep -q '"result":"failure"' test-results.json; then
41+ echo "β Tests failed"
42+ exit 1
43+ fi
44+ echo "β
All tests passed"
You canβt perform that action at this time.
0 commit comments