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

feat(code_push_client): track version #646

Merged
merged 1 commit into from
Jun 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/actions/verify_version/action.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Verify Version Workflow
description: Verify the version of the package is correct

inputs:
working_directory:
required: false
type: string
description: "The working directory to run the command in"
default: "."

runs:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,12 @@ jobs:
filters: |
shorebird_cli:
- ./.github/workflows/main.yaml
- ./.github/actions/dart_package
- ./.github/actions/verify_version/action.yaml
- packages/shorebird_cli/**
shorebird_code_push_client:
- ./.github/workflows/main.yaml
- ./.github/actions/verify_version/action.yaml
- packages/shorebird_code_push_client/**

build_dart_packages:
needs: changes
Expand Down
3 changes: 3 additions & 0 deletions packages/shorebird_code_push_client/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
include: package:very_good_analysis/analysis_options.5.0.0.yaml
analyzer:
exclude:
- lib/src/version.dart
3 changes: 3 additions & 0 deletions packages/shorebird_code_push_client/dart_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
tags:
version-verify:
skip: "Should only be run during pull request. Verifies if version file is updated."
2 changes: 2 additions & 0 deletions packages/shorebird_code_push_client/lib/src/version.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/shorebird_code_push_client/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ dependencies:
path: ../shorebird_code_push_protocol

dev_dependencies:
build_runner: ^2.0.0
build_verify: ^3.0.0
build_version: ^2.0.0
mocktail: ^0.3.0
path: ^1.8.3
test: ^1.19.2
Expand Down
15 changes: 15 additions & 0 deletions packages/shorebird_code_push_client/test/ensure_build_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@Tags(['version-verify'])
library;

import 'package:build_verify/build_verify.dart';
import 'package:test/test.dart';

void main() {
test(
'ensure_build',
() => expectBuildClean(
packageRelativeDirectory: 'packages/shorebird_code_push_client',
),
timeout: const Timeout.factor(2),
);
}