Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
dickermoshe committed Feb 13, 2025
1 parent 9ad019a commit 205f76e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/sugar_unit_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,23 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: subosito/[email protected]
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install Java
uses: actions/setup-java@v4
with:
distribution: "adopt"
java-version: "11.0.26+4"
- run: dart pub get
- run: dart analyze --fatal-warnings
- run: dart format . --set-exit-if-changed --output none
- run: dart run tool/generate_timezones.dart
- run: dart run coverage:test_with_coverage
- run: sudo apt-get update -y
- run: sudo apt-get install -y lcov
- run: lcov --remove ./coverage/lcov.info '**.g.dart' -o ./coverage/lcov.info
- uses: codecov/codecov-action@v5
with:
files: ./sugar/coverage/lcov.info
files: ./sugar/coverage/lcov.info
2 changes: 2 additions & 0 deletions sugar/lib/src/time/zone/providers/embedded/tzdb.g.dart

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions sugar/tool/generate_timezones.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,13 @@ void main(List<String> args) async {
}

final content = '''
// dart format off
// ignore_for_file: prefer_single_quotes
part of 'tzdb.dart';
/// The timezone database.
const _tzdb = ${jsonEncode(tzDb)};
// dart format on
''';
File(p.join(Directory.current.path, 'lib', 'src', 'time', 'zone', 'providers', 'embedded', 'tzdb.g.dart'))
..createSync()
Expand Down

0 comments on commit 205f76e

Please sign in to comment.