CharlVS is running unit tests on PR π #29
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
# Runs unit tests on PRs to ensure the app is working as expected | |
name: Run unit test on PR | |
run-name: ${{ github.actor }} is running unit tests on PR π | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
unit_tests_: | |
runs-on: [self-hosted, Linux] | |
timeout-minutes: 15 | |
steps: | |
- name: Setup GH Actions | |
uses: actions/checkout@v4 | |
- name: Install Flutter and dependencies | |
uses: ./.github/actions/flutter-deps | |
- name: Fetch packages and generate assets | |
uses: ./.github/actions/generate-assets | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Validate build | |
uses: ./.github/actions/validate-build | |
- name: Test unit_test (unix) | |
id: unit_tests | |
continue-on-error: false | |
timeout-minutes: 15 | |
env: | |
GITHUB_API_PUBLIC_READONLY_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
flutter test test_units/main.dart | |
- name: Generate unit test coverage report | |
id: unit_test_coverage | |
timeout-minutes: 15 | |
uses: ./.github/actions/code-coverage | |
with: | |
test_file: 'test_units/main.dart' |