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