-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from justkawal/codecov
Add Codecov
- Loading branch information
Showing
17 changed files
with
256 additions
and
166 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# This file is used to define a set of default reviewers. | ||
* @justkawal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: Dart | ||
name: Build and Test | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
paths-ignore: | ||
- "**.md" | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- "**.md" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 2 | ||
|
||
# Note: This workflow uses the latest stable version of the Dart SDK. | ||
# You can specify other versions if desired, see documentation here: | ||
|
@@ -31,12 +35,25 @@ jobs: | |
- name: Verify formatting | ||
run: dart format --output=none --set-exit-if-changed . | ||
|
||
# Consider passing '' for slightly stricter analysis. | ||
# Consider passing '--fatal-infos' for slightly stricter analysis. | ||
- name: Analyze project source | ||
run: dart analyze --fatal-infos . | ||
run: dart analyze --fatal-infos | ||
|
||
# Run tests | ||
- name: Run Tests | ||
run: dart test --fail-fast | ||
|
||
# Activate coverage | ||
- name: Activate Coverage | ||
run: dart pub global activate coverage | ||
|
||
# Run coverage | ||
- name: Run Coverage | ||
run: dart pub global run coverage:test_with_coverage | ||
|
||
# Code coverage | ||
- uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
directory: ./coverage | ||
|
||
# Your project will need to have tests in test/ and a dependency on | ||
# package:test for this step to succeed. Note that Flutter projects will | ||
# want to change this to 'flutter test'. | ||
- name: Run tests | ||
run: dart test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
## 1.0.0 | ||
|
||
- Initial version. | ||
|
||
## 1.0.1 | ||
- Publish version. | ||
|
||
## 1.0.2 | ||
- Added Codecov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
codecov: | ||
require_ci_to_pass: true | ||
|
||
coverage: | ||
status: | ||
project: off | ||
patch: off | ||
|
||
parsers: | ||
gcov: | ||
branch_detection: | ||
conditional: yes | ||
loop: yes | ||
method: no | ||
macro: no | ||
|
||
# excluding generated files and examples from the coverage report | ||
ignore: | ||
- "**/example/" | ||
- "examples" | ||
- "**/*.g.dart" | ||
|
||
comment: | ||
layout: "reach,diff,flags,tree" | ||
behavior: default | ||
require_changes: false |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import 'dart:typed_data'; | ||
import 'package:convert/convert.dart'; | ||
import 'package:edwards25519/edwards25519.dart'; | ||
|
||
void main() { | ||
final p1 = Point.zero() | ||
..setBytes(Uint8List.fromList(hex.decode( | ||
'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'))); | ||
|
||
final p2 = Point.zero() | ||
..setBytes(Uint8List.fromList(hex.decode( | ||
'1200000000000000000000000000000000000000000000000000000000000080'))); | ||
|
||
// if returns 1 then it is equal, 0 otherwise | ||
final isEqual = p1.equal(p2) == 1; | ||
print('isEqual: $isEqual'); | ||
|
||
final res = hex.encode(p1.Bytes()); | ||
// res: 1200000000000000000000000000000000000000000000000000000000000080 | ||
print('res: $res'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
name: edwards25519 | ||
description: ed25519, where security meets simplicity in cryptography!! | ||
version: 1.0.1 | ||
description: edwards25519, where security meets simplicity in cryptography!! | ||
version: 1.0.2 | ||
repository: https://github.com/justkawal/edwards25519 | ||
|
||
environment: | ||
sdk: ^3.0.5 | ||
|
||
dev_dependencies: | ||
lints: ^2.0.0 | ||
test: ^1.21.0 | ||
lints: ^3.0.0 | ||
test: ^1.24.9 | ||
convert: ^3.1.1 |
Oops, something went wrong.