forked from eatvio/eatvio_app
Merge pull request 'main' (#15) from apoloz/eatvio_app:main into main
Reviewed-on: http://10.55.5.123:3000/eatvio/eatvio_app/pulls/15
This commit is contained in:
@@ -2,12 +2,21 @@ name: Android Release
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
env:
|
||||
flutter_version: "3.19.0"
|
||||
java_version: "12.x"
|
||||
flutter_channel: "stable"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ runner.tool_cache }}/flutter
|
||||
key: flutter-${{ env.flutter_version }}-${{ env.flutter_channel }}
|
||||
|
||||
- name: Install jq
|
||||
run: |
|
||||
@@ -20,26 +29,43 @@ jobs:
|
||||
java-version: "12.x"
|
||||
cache: "gradle"
|
||||
|
||||
- uses: actions/flutter-action@v2
|
||||
- id: flutter-action
|
||||
uses: actions/flutter-action@v2
|
||||
with:
|
||||
channel: "stable"
|
||||
flutter-version: "3.19.0"
|
||||
channel: ${{ env.flutter_channel }}
|
||||
flutter-version: ${{ env.flutter_version }}
|
||||
cache: true
|
||||
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache
|
||||
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
|
||||
pub-cache-key: "flutter-pub:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache of dart pub get dependencies
|
||||
pub-cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path
|
||||
|
||||
- name: show cache keys
|
||||
run: |
|
||||
echo CACHE-PATH=${{ steps.flutter-action.outputs.CACHE-PATH }}
|
||||
echo CACHE-KEY=${{ steps.flutter-action.outputs.CACHE-KEY }}
|
||||
echo CHANNEL=${{ steps.flutter-action.outputs.CHANNEL }}
|
||||
echo VERSION=${{ steps.flutter-action.outputs.VERSION }}
|
||||
echo ARCHITECTURE=${{ steps.flutter-action.outputs.ARCHITECTURE }}
|
||||
echo PUB-CACHE-PATH=${{ steps.flutter-action.outputs.PUB-CACHE-PATH }}
|
||||
echo PUB-CACHE-KEY=${{ steps.flutter-action.outputs.PUB-CACHE-KEY }}
|
||||
shell: bash
|
||||
|
||||
- name: fix dir permissions
|
||||
run: |
|
||||
git config --global --add safe.directory /opt/hostedtoolcache/flutter/stable-3.19.0-x64
|
||||
git config --global --add safe.directory /opt/hostedtoolcache/flutter/${{ env.flutter_channel }}-${{ env.flutter_version }}-${{ steps.flutter-action.outputs.ARCHITECTURE }}
|
||||
flutter --version
|
||||
|
||||
- name: Get dependencies
|
||||
run: flutter pub get
|
||||
|
||||
- name: Native Analyze
|
||||
run: flutter analyze
|
||||
|
||||
- name: Run Code Metrics
|
||||
run: flutter pub run dart_code_metrics:metrics lib --disable-sunset-warning --fatal-warnings --fatal-performance
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
touch .env
|
||||
flutter test
|
||||
|
||||
# - name: Build apk
|
||||
# run: flutter build apk
|
||||
|
||||
|
||||
67
.gitea/workflows/test.yml
Normal file
67
.gitea/workflows/test.yml
Normal file
@@ -0,0 +1,67 @@
|
||||
name: Eatvio App Android Test
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
env:
|
||||
flutter_version: "3.19.0"
|
||||
java_version: "12.x"
|
||||
flutter_channel: "stable"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ runner.tool_cache }}/flutter
|
||||
key: flutter-${{ env.flutter_version }}-${{ env.flutter_channel }}
|
||||
|
||||
- name: Install jq
|
||||
run: |
|
||||
apt update
|
||||
apt-get install -y jq
|
||||
|
||||
- uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: "zulu"
|
||||
java-version: "12.x"
|
||||
cache: "gradle"
|
||||
|
||||
- id: flutter-action
|
||||
uses: actions/flutter-action@v2
|
||||
with:
|
||||
channel: ${{ env.flutter_channel }}
|
||||
flutter-version: ${{ env.flutter_version }}
|
||||
cache: true
|
||||
|
||||
- name: show cache keys
|
||||
run: |
|
||||
echo CACHE-PATH=${{ steps.flutter-action.outputs.CACHE-PATH }}
|
||||
echo CACHE-KEY=${{ steps.flutter-action.outputs.CACHE-KEY }}
|
||||
echo CHANNEL=${{ steps.flutter-action.outputs.CHANNEL }}
|
||||
echo VERSION=${{ steps.flutter-action.outputs.VERSION }}
|
||||
echo ARCHITECTURE=${{ steps.flutter-action.outputs.ARCHITECTURE }}
|
||||
echo PUB-CACHE-PATH=${{ steps.flutter-action.outputs.PUB-CACHE-PATH }}
|
||||
echo PUB-CACHE-KEY=${{ steps.flutter-action.outputs.PUB-CACHE-KEY }}
|
||||
shell: bash
|
||||
|
||||
- name: fix dir permissions
|
||||
run: |
|
||||
git config --global --add safe.directory /opt/hostedtoolcache/flutter/${{ env.flutter_channel }}-${{ env.flutter_version }}-${{ steps.flutter-action.outputs.ARCHITECTURE }}
|
||||
flutter --version
|
||||
|
||||
- name: Get dependencies
|
||||
run: flutter pub get
|
||||
|
||||
- name: Native Analyze
|
||||
run: flutter analyze
|
||||
|
||||
- name: Run Code Metrics
|
||||
run: flutter pub run dart_code_metrics:metrics lib --disable-sunset-warning --fatal-warnings --fatal-performance
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
touch .env
|
||||
flutter test
|
||||
Reference in New Issue
Block a user