Skip to content

Commit cec7575

Browse files
committed
. e added dependabot, configure github action, added codecov config
1 parent ba19fae commit cec7575

7 files changed

Lines changed: 54 additions & 13 deletions

File tree

‎.github/dependabot.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"

‎.github/workflows/build_and_test.yml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,13 @@ jobs:
2121
run: |
2222
./build_and_test.sh
2323
shell: bash
24+
- name: Check Code Coverage
25+
uses: VeryGoodOpenSource/very_good_coverage@v2.2.0
26+
with:
27+
path: coverage/lcov.info
28+
min_coverage: 30
29+
30+
- name: Upload coverage to Codecov
31+
uses: codecov/codecov-action@v3
32+
with:
33+
token: ${{ secrets.CODECOV_TOKEN }}

‎README.md‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
[![Build and test](https://github.com/approvals/ApprovalTests.Dart/actions/workflows/build_and_test.yml/badge.svg)](https://github.com/approvals/ApprovalTests.Dart/actions/workflows/build_and_test.yml)
2-
31
<div align="center">
42
<p align="center">
53
<a href="https://github.com/approvals/ApprovalTests.Dart" align="center">
@@ -21,14 +19,19 @@
2119
<a href="https://pub.dev/packages/approval_tests/score"><img src="https://img.shields.io/pub/popularity/approval_tests?logo=flutter" alt="Pub popularity"></a>
2220
<a href="https://pub.dev/packages/approval_tests/score"><img src="https://img.shields.io/pub/points/approval_tests?logo=flutter" alt="Pub points"></a>
2321
</p>
22+
<p align="center">
23+
<a href="https://github.com/approvals/ApprovalTests.Dart/actions/workflows/build_and_test.yml"><img src="https://github.com/approvals/ApprovalTests.Dart/actions/workflows/build_and_test.yml/badge.svg" alt="Build and test badge"></a>
24+
</p>
2425

2526
## 📖 About
2627

27-
Unit testing asserts can be **difficult** to use. `Approval tests` simplify this by taking a snapshot of the results, and confirming that they have not changed.
28+
**[Approval Tests](https://approvaltests.com/)** are an alternative to assertions. You’ll find them useful for testing objects with complex values *(such as long strings)*, lots of properties, or collections of objects.
29+
30+
`Approval tests` simplify this by taking a snapshot of the results, and confirming that they have not changed.
2831

2932
In normal unit testing, you say `expect(person.getAge(), 5)`. Approvals allow you to do this when the thing that you want to assert is no longer a primitive but a complex object. For example, you can say, `Approvals.verify(person)`.
3033

31-
I am writing an implementation of a great tool like **[Approval Tests](https://approvaltests.com/)** in Dart. If anyone wants to help, please **[text](https://t.me/yelmuratoff)** me. 🙏
34+
I am writing an implementation of **[Approval Tests](https://approvaltests.com/)** in Dart. If anyone wants to help, please **[text](https://t.me/yelmuratoff)** me. 🙏
3235

3336
<!-- At the moment the package is **in development** and <u>not ready</u> to use. 🚧 -->
3437

‎TODO.md‎

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,25 @@
1-
* [x] Github actions
2-
* [x] Building run script
1+
# TODO
2+
3+
This is the markdown todo file for Approval Tests.
4+
5+
## Tasks
6+
7+
Tasks for the project are listed below:
8+
9+
* [ ] Check the causes of incorrect file paths in Windows
310
* [ ] Markdown snippets
411
* [ ] Startup project
5-
* [x] Add badges
6-
* [ ] Add dependabot
7-
* [ ] Deploy
8-
* [ ] Deploy script
12+
* [ ] Deploy script to automate the deployment process to pub.dev
13+
* [ ] Add codecov and coverage badge
14+
* [ ] Add contributing guide
15+
* [ ] Cover the project completely with tests
16+
* [ ] Refactor the code based on ApprovalTests architectural rules
17+
* [ ] Add more detailed documentation to the project
18+
19+
# DONE
20+
21+
* [x] Github actions
22+
* [x] Building run script
23+
* [x] Add badges
24+
* [x] Add dependabot
25+
* [x] Deploy to pub.dev

‎build_and_test.sh‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
#!/bin/bash -e
2-
dart run test
2+
# chmod +x build_and_test.sh
3+
dart pub get
4+
dart format .
5+
dart analyze
6+
dart run test --coverage=./coverage && dart pub global run coverage:format_coverage --packages=.dart_tool/package_config.json --report-on=lib --lcov -o ./coverage/lcov.info -i ./coverage

‎pubspec.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# * 0.0.4 for a minor release.
44
name: approval_tests
55
description: Approval Tests implementation in Dart. Inspired by ApprovalTests.
6-
version: 0.3.3-dev
6+
version: 0.3.4-dev
77
repository: https://github.com/K1yoshiSho/approval_tests_dart
88
homepage: https://github.com/K1yoshiSho/approval_tests_dart.git
99
issue_tracker: https://github.com/K1yoshiSho/approval_tests_dart/issues

‎test/approval_test.dart‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ void main() {
195195
);
196196
});
197197

198-
test("Method «verify» must throw DoesntMatchException with error handling", () {
198+
test("Method «verify» must throw DoesntMatchException with error handling",
199+
() {
199200
expect(
200201
() => helper.verify(
201202
'Hello W0rld',

0 commit comments

Comments
 (0)