Skip to content

Commit

Permalink
test(spdx_license): include test and workflow (#825)
Browse files Browse the repository at this point in the history
* feat(spdx_license): include tryParse

* test: include brick test

* docs

* updated pubspec

* typo

* ci: update workflow

* ci: workflow

* ci: workflow

* ci: workflow

* ci: workflow

* ci: workflow

* ci: workflow

* ci: workflow

* ci: workflow

* ci: workflow

* docs
  • Loading branch information
alestiago committed Oct 3, 2023
1 parent d4a0763 commit e411a9b
Show file tree
Hide file tree
Showing 5 changed files with 754 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/spdx_license.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,40 @@ jobs:
uses: VeryGoodOpenSource/very_good_coverage@v2.1.0
with:
path: bricks/spdx_license/hooks/coverage/lcov.info

build_brick:
defaults:
run:
working-directory: bricks/spdx_license
runs-on: ubuntu-latest
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v4

- name: 🎯 Setup Dart
uses: dart-lang/setup-dart@v1
with:
sdk: 3.1.0

- name: 📦 Install Dependencies
run: dart pub get

- name: 🧱 Mason make
# If this step fails, you may need to run the following command (from bricks/spdx_license):
# ```sh
# mason make spdx_license --licenses "[]" -o test --on-conflict overwrite
# ```
# This will build the brick and generate the latest files for testing.
run: |
dart pub global activate mason_cli
mason get
mason make spdx_license --licenses "[]" -o test --on-conflict overwrite --set-exit-if-changed
- name: ✨ Check Formatting
run: dart format --set-exit-if-changed test/**_test.dart

- name: 🕵️ Analyze
run: dart analyze --fatal-infos --fatal-warnings test/**_test.dart

- name: 🧪 Run Tests
run: dart test -j 4 --run-skipped --test-randomize-ordering-seed random
4 changes: 4 additions & 0 deletions bricks/spdx_license/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include: package:very_good_analysis/analysis_options.5.1.0.yaml
analyzer:
exclude:
- "__brick__"
13 changes: 13 additions & 0 deletions bricks/spdx_license/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: spdx_license_brick_test
description: Testing package for the SPDX License brick output.
version: 0.1.0+1
repository: https://github.com/VeryGoodOpenSource/very_good_cli
issue_tracker: https://github.com/VeryGoodOpenSource/very_good_cli/issues
publish_to: none

environment:
sdk: ">=3.0.0 <4.0.0"

dev_dependencies:
test: ^1.19.2
very_good_analysis: ^5.1.0
Loading

0 comments on commit e411a9b

Please sign in to comment.