-
Notifications
You must be signed in to change notification settings - Fork 2
82 lines (68 loc) · 2.23 KB
/
ci-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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Tests
on:
workflow_dispatch:
inputs:
target_environment:
required: false
type: choice
description: Select environment
default: dev
options:
- dev
push:
paths:
- .github/**/*.yml
- scripts/**
- starterkit_app/**
branches:
- main
pull_request:
paths:
- .github/**/*.yml
- scripts/**
- starterkit_app/**
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
PROJECT_WORKING_DIRECTORY: "starterkit_app"
permissions: {}
jobs:
run-tests:
runs-on: macos-latest
# Set `contents` to `write` if you want to commit to this repository
permissions: {}
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set app environment
uses: ./.github/workflows/steps/set-app-environment
with:
target_environment: ${{ github.event.inputs.target_environment }}
- name: Install Flutter
uses: ./.github/workflows/steps/install-flutter
with:
working_directory: ${{ env.PROJECT_WORKING_DIRECTORY }}
- name: Run code generation
uses: ./.github/workflows/steps/run-pub-get-and-code-generation
with:
generate_intl: "true"
working_directory: ${{ env.PROJECT_WORKING_DIRECTORY }}
- name: Add ignore-coverage to generated files
run: |
bash ../scripts/ignore_generated_files_from_coverage.sh
working-directory: ${{ env.PROJECT_WORKING_DIRECTORY }}
- name: Run tests
uses: ./.github/workflows/steps/run-tests
with:
working_directory: ${{ env.PROJECT_WORKING_DIRECTORY }}
- uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ env.PROJECT_WORKING_DIRECTORY }}/coverage/lcov.info
fail_ci_if_error: true
verbose: true