Skip to content

Updated Version

Updated Version #435

Workflow file for this run

name: Analysis and Code Coverage
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Clone the Repository
uses: actions/checkout@v4
- name: Install Tools
run: sudo apt update && sudo apt install lcov -y
- name: Reconfigure git to Use HTTP Authentication
run: >
git config --global url."https://github.com/".insteadOf 'git@github.com:'
- name: Setup Flutter SDK
uses: flutter-actions/setup-flutter@v3
with:
channel: stable
version: 3.19.6
- name: Enable Flutter Desktop
run: flutter config --enable-linux-desktop
shell: bash
- name: Get Flutter Packages
run: flutter pub get
- name: Flutter Create
run: flutter create .
- name: Clone Mozilla's CA cert bundle module into root directory
run: git clone https://github.com/Chia-Network/mozilla-ca.git
- name: Configure Linux Build
run: |
sudo apt install libgtk-3-dev libgtk-3-0 libblkid1 liblzma5 ninja-build libmpv-dev mpv -y
sudo mkdir -p /usr/local/chia_crypto_utils && sudo chmod 777 /usr/local/chia_crypto_utils
- name: Check Flutter Readiness
run: flutter doctor
- name: Run Integration Tests
run: |
export DISPLAY=:99
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
sudo apt install network-manager
./integration_test/run_tests.sh
shell: bash
- name: Run Unit Tests
run: flutter test test --coverage --coverage-path=coverage/test.info
- name: Merge Coverage Files
run: |
lcov --add-tracefile coverage/test.info --add-tracefile coverage/integration_test.info --output-file coverage/merged_coverage.info
rm -rf coverage/*test.info
- name: Generate Coverage Report
run: genhtml coverage/merged_coverage.info -o coverage
- name: Upload code coverage to GitHub
uses: actions/upload-artifact@27121b0bdffd731efa15d66772be8dc71245d074
with:
name: code-coverage
path: coverage