Skip to content

Commit

Permalink
Modify Actions for Dart SDK setup
Browse files Browse the repository at this point in the history
  • Loading branch information
dinkopehar committed Mar 18, 2024
1 parent c56a6bb commit b7b0d8a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 25 deletions.
28 changes: 7 additions & 21 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,12 @@ jobs:
name: Run tests
runs-on: ubuntu-latest

container:
image: google/dart:latest

steps:
- uses: actions/checkout@v2
- name: Telegram Message Notify - Trigger
run: |
curl --silent https://api.telegram.org/bot\${{ secrets.TELEGRAM_TOKEN }}/sendMessage\?chat_id\=${{ secrets.TELEGRAM_TO }}\&text\="Build Triggered by ${{ github.actor }} - ${{ github.event_name }}" > /dev/null
- name: Install dependencies
run: pub get
- name: Run tests
run: pub run test
- name: Telegram Message Notify - FAILURE
if: failure()
run: |
curl --silent https://api.telegram.org/bot\${{ secrets.TELEGRAM_TOKEN }}/sendMessage\?chat_id\=${{ secrets.TELEGRAM_TO }}\&text\="Build has *FAILED*."\&parse_mode\="Markdown" > /dev/null
curl --silent https://api.telegram.org/bot\${{ secrets.TELEGRAM_TOKEN }}/sendSticker\?chat_id\=${{ secrets.TELEGRAM_TO }}\&sticker\=CAACAgIAAxkBAAMmXnD--5Hl7ayFoTNilFRaQf3Qh8MAAgMAA8A2TxOkKe7mffPAeBgE > /dev/null
- name: Telegram Message Notify - SUCCESS
if: success()
run: |
curl --silent https://api.telegram.org/bot\${{ secrets.TELEGRAM_TOKEN }}/sendMessage\?chat_id\=${{ secrets.TELEGRAM_TO }}\&text\="Build was *SUCCESS*."\&parse_mode\="Markdown" > /dev/null
curl --silent https://api.telegram.org/bot\${{ secrets.TELEGRAM_TOKEN }}/sendSticker\?chat_id\=${{ secrets.TELEGRAM_TO }}\&sticker\=CAACAgIAAxkBAAMlXnD--Z2vyaFzqQcnyEVqnVs64cgAAggAA8A2TxNvbCYL3hqbaRgE > /dev/null
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1

- run: dart pub get
- run: dart format --output=none --set-exit-if-changed lib test
- run: dart analyze
- run: dart test

3 changes: 1 addition & 2 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ linter:
rules:
- cancel_subscriptions
- hash_and_equals
- iterable_contains_unrelated_type
- list_remove_unrelated_type
- collection_methods_unrelated_type
- test_types_in_equals
- unrelated_type_equality_checks
- valid_regexps
3 changes: 1 addition & 2 deletions test/mock_data_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ void main() {

test('Test mockFamilyName called from mockRange', () {
expect(mockRange(mockFamilyName, 10).length, equals(10));
expect(familyNames,
containsAll(mockRange(mockFamilyName, 15).toSet()));
expect(familyNames, containsAll(mockRange(mockFamilyName, 15).toSet()));
});
});

Expand Down

0 comments on commit b7b0d8a

Please sign in to comment.