CI: Forcing Java JDK to be 17 #185
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: FlutterCI | |
on: [ push, pull_request, workflow_dispatch ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Flutter action | |
uses: subosito/flutter-action@v2.10.0 | |
with: | |
channel: 'stable' | |
architecture: x64 | |
cache: true | |
- name: Flutter Linter Check | |
run: flutter analyze | |
- name: Install Python dependencies | |
run: | | |
sudo apt update -y && sudo apt install -y python3 python3-distutils python-is-python3 curl bc xmlstarlet | |
curl -O https://raw.githubusercontent.com/eriwen/lcov-to-cobertura-xml/master/lcov_cobertura/lcov_cobertura.py && chmod +x lcov_cobertura.py | |
- name: Flutter Test Setup | |
run: | | |
flutter pub get | |
flutter pub global activate junitreport | |
- name: Flutter Test Launch | |
run: | | |
flutter test --reporter json --coverage ./lib > tests.json | |
flutter pub global run junitreport:tojunit --input tests.json --output rspec.xml | |
./lcov_cobertura.py coverage/lcov.info | |
- name: Code Coverage Report from Cobertura | |
uses: irongut/CodeCoverageSummary@v1.3.0 | |
with: | |
filename: coverage.xml | |
fail_below_min: true | |
format: markdown | |
indicators: true | |
output: both | |
thresholds: '75 80' | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: code-coverage-results.md | |
path: ./code-coverage-results.md |