From 485153b8c09384fdbab56a12a0e87702cc7b7306 Mon Sep 17 00:00:00 2001 From: kirznernasta Date: Wed, 10 May 2023 17:29:57 +0300 Subject: [PATCH 1/2] Get rid of path in example/pubspec.yaml --- example/pubspec.lock | 7 ++++--- example/pubspec.yaml | 3 +-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/example/pubspec.lock b/example/pubspec.lock index 2c42ef1..ade7798 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -211,9 +211,10 @@ packages: wtf_sliding_sheet: dependency: "direct main" description: - path: ".." - relative: true - source: path + name: wtf_sliding_sheet + sha256: "518772ea0fb602c7e59a84b0ac8269d8e53a3abd0c7a650ca3fe85090aa13578" + url: "https://pub.dev" + source: hosted version: "0.6.1" sdks: dart: ">=2.19.0 <3.0.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 1f51c75..c9cda42 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -14,8 +14,7 @@ dependencies: material_design_icons_flutter: ^6.0.7096 - wtf_sliding_sheet: - path: ../ + wtf_sliding_sheet: ^0.6.1 dev_dependencies: flutter_lints: ^2.0.1 From c78afb5ff5e043240e0db19a1b3d820286fade1b Mon Sep 17 00:00:00 2001 From: kirznernasta Date: Wed, 24 May 2023 01:34:27 +0300 Subject: [PATCH 2/2] add ci/cd with analyzer and pana check --- .github/workflows/main.yml | 25 +++++++++++++++++++++++++ scripts/pana_check.sh | 12 ++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/main.yml create mode 100644 scripts/pana_check.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..b3e05b0 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,25 @@ +name: WTF Sliding Sheet CI/CD + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - uses: subosito/flutter-action@v2 + with: + flutter-version: '3.x' + channel: 'stable' + + - name: Analyzing + run: flutter analyze + + - name: Pana check + run: ../scripts/pana_check.sh diff --git a/scripts/pana_check.sh b/scripts/pana_check.sh new file mode 100644 index 0000000..21e6a00 --- /dev/null +++ b/scripts/pana_check.sh @@ -0,0 +1,12 @@ +threshold=10 +dart pub global activate pana +pana --exit-code-threshold $threshold --no-warning +retVal=$? +if [ $retVal -eq 0 ] +then + echo "Good pana score" + exit 0 +else + echo "Pana score less than minimum" + exit 1 +fi \ No newline at end of file