-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (61 loc) · 2.61 KB
/
main.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
# This is a basic workflow to help you get started with Actions
name: Quality check
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Reusable workflow call
workflow_call:
secrets:
CLIENT_ID:
required: true
CLIENT_SECRET:
required: true
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
check:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Note: This workflow uses the latest stable version of the Dart SDK.
# You can specify other versions if desired, see documentation here:
# https://github.com/dart-lang/setup-dart/blob/main/README.md
- uses: dart-lang/setup-dart@v1
- name: Install dependencies
run: dart pub get
# Verify the use of 'dart format' on each commit
- name: Verify formatting
run: dart format -o none --set-exit-if-changed .
# Consider passing '--fatal-infos' for slightly stricter analysis
- name: Analyze project source
run: dart analyze --fatal-infos
# Ensure your shell script is executable
- name: Make shell script write_credentials.sh executable
run: chmod +x .github/workflows/write_credentials.sh
# Run bash script in order to provide test credentials
- name: Write down test credentials
run: ./.github/workflows/write_credentials.sh
env:
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
# Your project will need to have tests in test/ and a dependency on
# package:test for this step to succeed. Note that Flutter projects will
# want to change this to 'flutter test'.
- name: Run tests
run: dart test
# The pub.dev site uses the analysis tool pana to calculate pub points.
# This is run automatically on the pub.dev site whenever you publish a new package,
# or a new version of an existing package.
- name: Calculating pub points prior to publishing
run: |
dart pub global activate pana
dart pub global run pana --exit-code-threshold 0 --json