-
Notifications
You must be signed in to change notification settings - Fork 217
43 lines (35 loc) · 1.17 KB
/
unit-tests-on-pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# 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'