Skip to content

Commit

Permalink
Chore: added test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Akalanka47000 committed Jun 24, 2023
1 parent 616db34 commit c3c182f
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CI Tests

on:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
version: ['2.x', '3.x']
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.version }}
channel: 'stable'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:'

- run: flutter pub get
- run: melos bootstrap
- run: melos exec --diff=$(git log --skip=1 -n 1 --pretty=format:"%H") -- flutter test
3 changes: 2 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
. "$(dirname -- "$0")/_/husky.sh"

dart format . --fix
dart run lint_staged
dart run lint_staged
git add .
2 changes: 2 additions & 0 deletions packages/flodash/lib/modules/date/now.dart
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
@Deprecated("Use inbuilt DateTime.now().millisecondsSinceEpoch instead")

/// Gets the timestamp of the number of milliseconds that have elapsed since the Unix epoch (1 January 1970 00:00:00 UTC).
int now() => DateTime.now().millisecondsSinceEpoch;

0 comments on commit c3c182f

Please sign in to comment.