-
Notifications
You must be signed in to change notification settings - Fork 17
56 lines (43 loc) · 1.68 KB
/
unit_tests.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
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Unit Tests & Code Quality
on:
push:
branches: [master, f-droid]
pull_request:
branches: [master, f-droid]
# Cancel a currently running workflow from the same PR, branch or tag when a new workflow is
# triggered (ref https://stackoverflow.com/a/72408109)
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
flutter:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
# Setup Environment
- uses: actions/checkout@v4
- name: Install flutter wrapper
run: ./scripts/install_flutter_wrapper.sh
- name: Get dependencies (i.e., melos)
run: .flutter/bin/dart pub get
- name: Melos Bootstrap
run: .flutter/bin/dart run melos bootstrap
- name: "Check fmt"
run: .flutter/bin/dart run melos format-check
- name: "Analyze Code"
run: .flutter/bin/dart run melos analyze-check
- name: "Check translations"
run: |
cd app && ./../flutterw gen-l10n && cd ..
./scripts/check_translations.sh ./app/.untranslated-messages.txt
- name: "Run unit tests Encointer"
run: .flutter/bin/dart run melos unit-test-app-exclude-encointer-node-e2e
- name: "Run unit tests Packages"
run: .flutter/bin/dart run melos unit-test-packages
- name: "Run the build_runner and return an error if files are changed"
run: |
.flutter/bin/dart run melos run-build-runner
.flutter/bin/dart run melos format
git diff --exit-code
# test-js:
# Todo: Currently e2e tests are mixed with unit tests (although the amount of unit tests is really small)