chore(deps): Bump the dependencies group with 12 updates #72
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: Dart Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
api_level: 35 | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y sqlite3 libsqlite3-dev | |
- name: Setup Flutter (use cache) | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
cache: true | |
- name: Install dependencies | |
run: flutter pub get | |
- name: Prepare env file | |
run: cp .env.sample .env | |
- name: Run tests | |
run: | | |
dart run full_coverage | |
flutter test --coverage | |
- name: Upload coverage artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: unit-test-coverage | |
path: coverage/lcov.info | |
# integration-test: | |
# runs-on: ubuntu-latest | |
# timeout-minutes: 20 | |
# steps: | |
# - name: Checkout code | |
# uses: actions/checkout@v4 | |
# - name: Setup Flutter (use cache) | |
# uses: subosito/flutter-action@v2 | |
# with: | |
# channel: stable | |
# cache: true | |
# - name: Cache Flutter dependencies | |
# uses: actions/cache@v4 | |
# with: | |
# path: ~/.pub-cache | |
# key: pub-cache-${{ runner.os }}-${{ hashFiles('pubspec.yaml', 'pubspec.lock') }} | |
# restore-keys: | | |
# pub-cache-${{ runner.os }}- | |
# - name: Cache Flutter build outputs | |
# uses: actions/cache@v4 | |
# with: | |
# path: build/ | |
# key: flutter-build-${{ runner.os }}-${{ hashFiles('pubspec.yaml', 'pubspec.lock') }} | |
# restore-keys: | | |
# flutter-build-${{ runner.os }}- | |
# - name: Install dependencies | |
# run: flutter pub get | |
# - name: Prepare env file | |
# run: cp .env.sample .env | |
# - name: Install Android dependencies | |
# run: | | |
# sudo apt-get update | |
# sudo apt-get install -y lib32stdc++6 lib32z1 | |
# - name: Setup Java 17 | |
# uses: actions/setup-java@v4 | |
# with: | |
# distribution: temurin | |
# java-version: 17 | |
# - name: Enable KVM | |
# run: | | |
# echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
# sudo udevadm control --reload-rules | |
# sudo udevadm trigger --name-match=kvm | |
# - name: Setup Android SDK & Run integration tests | |
# uses: reactivecircus/android-emulator-runner@v2 | |
# with: | |
# api-level: ${{ env.api_level }} | |
# target: google_apis | |
# arch: x86_64 | |
# profile: pixel_6_pro | |
# script: flutter test integration_test --coverage --coverage-path coverage/lcov-it.info | |
# - name: Upload coverage artifact | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: integration-test-coverage | |
# path: coverage/lcov-it.info | |
codecov: | |
# needs: [test, integration-test] | |
needs: [test] | |
runs-on: ubuntu-latest | |
if: always() | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Download unit test coverage artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: unit-test-coverage | |
path: coverage | |
# - name: Download integration test coverage artifact | |
# uses: actions/download-artifact@v4 | |
# with: | |
# name: integration-test-coverage | |
# path: coverage | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
# files: coverage/lcov.info,coverage/lcov-it.info | |
files: coverage/lcov.info | |
sonar: | |
# needs: [test, integration-test] | |
needs: [test] | |
runs-on: ubuntu-latest | |
if: always() | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y sqlite3 libsqlite3-dev | |
- name: Setup Flutter (use cache) | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
cache: true | |
- name: Install dependencies | |
run: flutter pub get | |
- name: Prepare env file | |
run: cp .env.sample .env | |
- name: Download unit test coverage artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: unit-test-coverage | |
path: coverage | |
# - name: Download integration test coverage artifact | |
# uses: actions/download-artifact@v4 | |
# with: | |
# name: integration-test-coverage | |
# path: coverage | |
- name: SonarQube Scan | |
uses: SonarSource/sonarqube-scan-action@v4 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |