Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(spdx_license): include test and workflow #825

Merged
merged 18 commits into from
Oct 3, 2023
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
alestiago marked this conversation as resolved.
Show resolved Hide resolved
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