Skip to content

Commit

Permalink
add test for flutter-version-file
Browse files Browse the repository at this point in the history
  • Loading branch information
bartekpacia committed Apr 1, 2024
1 parent 228763f commit ac2ffe2
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/workflow.yaml
Expand Up @@ -76,6 +76,27 @@ jobs:
- run: flutter --version
shell: bash

test_version_file:
runs-on: ${{ matrix.operating-system }}

strategy:
matrix:
operating-system: [ubuntu-latest]

steps:
- name: Clone repository
uses: actions/checkout@v4
- uses: ./
with:
channel: stable
flutter-version-file: test/pubspec.yaml
- name: Verify Dart version
run: dart --version | grep '2.18.6'
shell: bash
- name: Verify Flutter version
run: flutter --version | grep '3.3.10'
shell: bash

test_print_output:
runs-on: macos-latest

Expand Down
2 changes: 1 addition & 1 deletion action.yaml
Expand Up @@ -13,7 +13,7 @@ inputs:
flutter-version:
description: The Flutter version to make available on the path
required: false
default: any
default: ""
flutter-version-file:
description: The pubspec.yaml file with exact Flutter version defined
required: false
Expand Down
2 changes: 1 addition & 1 deletion setup.sh
Expand Up @@ -103,7 +103,7 @@ done
[ -z "$ARCH" ] && ARCH="$ARCH_NAME"

if [ -n "$VERSION_FILE" ]; then
if [ -n "$VERSION" ] || [ "$VERSION" != "any" ] ; then
if [ -n "$VERSION" ]; then
echo "Cannot specify both a version and a version file"
exit 1
fi
Expand Down

0 comments on commit ac2ffe2

Please sign in to comment.