Skip to content

feature: v1.3.7

feature: v1.3.7 #25

name: Push Test Check Android
on:
push:
branches:
- '**'
- '!master'
jobs:
push_test_check_all:
name: Test all platforms
runs-on: [self-hosted, macOS]
steps:
- uses: actions/checkout@v4
- name: Set up Node.js 18
uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Install Landa Messenger CLI
run: npm install @landamessenger/landa-messenger-api -g
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
flutter-version: '3.24.3'
###################################################################
- name: Get CLI dependencies
working-directory: zstandard_cli
run: dart pub get
- name: Test CLI
working-directory: zstandard_cli
run: dart test --coverage=coverage
- name: Prepare CLI coverage
working-directory: zstandard_cli
run: dart pub global activate coverage
- name: Convert CLI coverage to LCOV
working-directory: zstandard_cli
run: dart pub global run coverage:format_coverage --packages=.dart_tool/package_config.json --report-on=lib --lcov --in=coverage --out=coverage/lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: zstandard_cli/coverage/lcov.info
###################################################################
- name: Get Android dependencies
working-directory: zstandard_android
run: flutter pub get
- name: Test Android
working-directory: zstandard_android
run: flutter test --coverage
- name: Upload Android coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: zstandard_android/coverage/lcov.info
###################################################################
- name: Get iOS dependencies
working-directory: zstandard_ios
run: flutter pub get
- name: Test iOS
working-directory: zstandard_ios
run: flutter test --coverage
- name: Upload iOS coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: zstandard_ios/coverage/lcov.info
###################################################################
- name: Get Web dependencies
working-directory: zstandard_web
run: flutter pub get
- name: Start ChromeDriver
run: |
chromedriver --port=4444 &
sleep 5 # Wait for ChromeDriver to start
- name: Run Web Integration Tests
working-directory: zstandard_web
run: flutter drive \
--driver=test_driver/integration_test.dart \
--target=integration_test/zstandard_web_integration_test.dart \
-d chrome
###################################################################
- name: Get macOS dependencies
working-directory: zstandard_macos
run: flutter pub get
- name: Test macOS
working-directory: zstandard_macos
run: flutter test --coverage
- name: Upload macOS coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: zstandard_macos/coverage/lcov.info
###################################################################
- name: Get Windows dependencies
working-directory: zstandard_windows
run: flutter pub get
- name: Test Windows
working-directory: zstandard_windows
run: flutter test --coverage
- name: Upload Windows coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: zstandard_windows/coverage/lcov.info
###################################################################
- name: Get Linux dependencies
working-directory: zstandard_linux
run: flutter pub get
- name: Test Linux
working-directory: zstandard_linux
run: flutter test --coverage
- name: Upload Linux coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: zstandard_linux/coverage/lcov.info
###################################################################
- name: Handle job completion
if: always()
run: |
if [ "${{ job.status }}" == "failure" ]; then
landa-messenger-api chat-send \
--id "${{ secrets.CHAT_ID }}" \
--api_key "${{ secrets.CHAT_KEY }}" \
--title "🔴 Test Failed" \
--body "${{ github.repository }}: ${{ github.event.head_commit.message }}" \
--url "https://github.com/landamessenger/zstandard/actions/workflows/push_test_check_macos.yml" \
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \
--background_color "#55000000" \
--text_color "#FFFFFFFF"
elif [ "${{ job.status }}" == "cancelled" ]; then
landa-messenger-api chat-send \
--id "${{ secrets.CHAT_ID }}" \
--api_key "${{ secrets.CHAT_KEY }}" \
--title "🟠 Test Canceled" \
--body "${{ github.repository }}: ${{ github.event.head_commit.message }}" \
--url "https://github.com/landamessenger/zstandard/actions/workflows/push_test_check_macos.yml" \
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \
--background_color "#55000000" \
--text_color "#FFFFFFFF"
else
landa-messenger-api chat-send \
--id "${{ secrets.CHAT_ID }}" \
--api_key "${{ secrets.CHAT_KEY }}" \
--title "🟢 Test Passed" \
--body "${{ github.repository }}: ${{ github.event.head_commit.message }}" \
--url "https://github.com/landamessenger/zstandard/actions/workflows/push_test_check_macos.yml" \
--image "https://avatars.githubusercontent.com/u/63705403?s=200&v=4" \
--background_color "#55000000" \
--text_color "#FFFFFFFF"
fi