-
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 #1 from muzzammilshahid/ci-and-linter
Add basic CI, Makefile, and linting rules
- Loading branch information
Showing
6 changed files
with
256 additions
and
9 deletions.
There are no files selected for viewing
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 @@ | ||
name: WAMP Dart | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Dart | ||
uses: dart-lang/setup-dart@v1 | ||
with: | ||
sdk: 3.3.0 | ||
|
||
- name: Install dependencies | ||
run: make install | ||
|
||
- name: Verify formatting | ||
run: make check-format | ||
|
||
- name: Check lint | ||
run: make lint | ||
|
||
- name: Run tests | ||
run: make tests |
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,17 @@ | ||
install: | ||
dart pub get | ||
|
||
lint: | ||
dart analyze | ||
|
||
lint-fix: | ||
dart fix --apply | ||
|
||
check-format: | ||
dart format --output=none --set-exit-if-changed --line-length 120 . | ||
|
||
format: | ||
dart format --line-length 120 . | ||
|
||
tests: | ||
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
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,5 +1,5 @@ | ||
import 'package:wamp/wamp.dart' as wamp; | ||
import "package:wamp/wamp.dart" as wamp; | ||
|
||
void main(List<String> arguments) { | ||
print('Hello world: ${wamp.calculate()}!'); | ||
print("Hello world: ${wamp.calculate()}!"); | ||
} |
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 +1 @@ | ||
export "src/wamp_base.dart"; | ||
export "src/wamp_base.dart"; |
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,8 +1,8 @@ | ||
import 'package:wamp/wamp.dart'; | ||
import 'package:test/test.dart'; | ||
import "package:test/test.dart"; | ||
import "package:wamp/wamp.dart"; | ||
|
||
void main() { | ||
test('calculate', () { | ||
test("calculate", () { | ||
expect(calculate(), 42); | ||
}); | ||
} |