|
1 | | -name: Test |
2 | | - |
3 | | -on: |
4 | | - workflow_dispatch: |
5 | | - push: |
6 | | - branches: [master] |
7 | | - paths: ['**.dart', '**.yaml', '**.yml'] |
8 | | - pull_request: |
9 | | - branches: [master] |
10 | | - paths: ['**.dart', '**.yaml', '**.yml'] |
11 | | - |
12 | | -jobs: |
13 | | - coverage: |
14 | | - if: github.repository == 'bitanon/hashlib_codecs' |
15 | | - strategy: |
16 | | - matrix: |
17 | | - os: [ubuntu-latest] |
18 | | - sdk: ['stable'] |
19 | | - runs-on: ${{ matrix.os }} |
20 | | - steps: |
21 | | - - uses: actions/checkout@v4 |
22 | | - |
23 | | - - uses: dart-lang/setup-dart@v1 |
24 | | - with: |
25 | | - sdk: ${{ matrix.sdk }} |
26 | | - |
27 | | - - name: 'Install global packages' |
28 | | - run: | |
29 | | - dart pub global activate coverage |
30 | | - dart pub global activate cobertura |
31 | | - dart pub global activate junitreport |
32 | | -
|
33 | | - - name: Run tests with coverage |
34 | | - run: bash ./scripts/coverage.sh |
35 | | - |
36 | | - - name: Upload results to Codecov |
37 | | - uses: codecov/codecov-action@v4 |
38 | | - with: |
39 | | - token: ${{ secrets.CODECOV_TOKEN }} |
40 | | - file: ./coverage/cobertura.xml |
41 | | - |
42 | | - - name: Upload test results to Codecov |
43 | | - if: ${{ !cancelled() }} |
44 | | - uses: codecov/test-results-action@v1 |
45 | | - with: |
46 | | - token: ${{ secrets.CODECOV_TOKEN }} |
47 | | - file: ./coverage/junit.xml |
48 | | - |
49 | | - test-on-stable: |
50 | | - strategy: |
51 | | - matrix: |
52 | | - os: [ubuntu-latest, macos-latest, windows-latest] |
53 | | - sdk: ['stable'] |
54 | | - runs-on: ${{ matrix.os }} |
55 | | - steps: |
56 | | - - uses: actions/checkout@v4 |
57 | | - |
58 | | - - uses: dart-lang/setup-dart@v1 |
59 | | - with: |
60 | | - sdk: ${{ matrix.sdk }} |
61 | | - |
62 | | - - name: Install dependencies |
63 | | - run: dart pub get |
64 | | - |
65 | | - - name: Verify formatting |
66 | | - run: dart format --output=none --set-exit-if-changed . |
67 | | - |
68 | | - - name: Analyze project source |
69 | | - run: dart analyze --fatal-infos |
70 | | - |
71 | | - - name: Run tests |
72 | | - run: dart test |
73 | | - |
74 | | - test-on-legacy: |
75 | | - strategy: |
76 | | - matrix: |
77 | | - os: [ubuntu-latest, windows-latest] |
78 | | - sdk: ['2.14'] |
79 | | - runs-on: ${{ matrix.os }} |
80 | | - steps: |
81 | | - - uses: actions/checkout@v4 |
82 | | - |
83 | | - - uses: dart-lang/setup-dart@v1 |
84 | | - with: |
85 | | - sdk: ${{ matrix.sdk }} |
86 | | - |
87 | | - - name: Run tests |
88 | | - run: dart test |
89 | | - |
90 | | - test-on-beta: |
91 | | - strategy: |
92 | | - matrix: |
93 | | - os: [ubuntu-latest] |
94 | | - sdk: ['beta'] |
95 | | - runs-on: ${{ matrix.os }} |
96 | | - steps: |
97 | | - - uses: actions/checkout@v4 |
98 | | - |
99 | | - - uses: dart-lang/setup-dart@v1 |
100 | | - with: |
101 | | - sdk: ${{ matrix.sdk }} |
102 | | - |
103 | | - - name: Install dependencies |
104 | | - run: dart pub get |
105 | | - |
106 | | - - name: Verify formatting |
107 | | - run: dart format --output=none --set-exit-if-changed . |
108 | | - |
109 | | - - name: Analyze project source |
110 | | - run: dart analyze --fatal-infos |
111 | | - |
112 | | - - name: Run tests |
113 | | - run: dart test |
| 1 | +name: Test |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + push: |
| 6 | + branches: [master] |
| 7 | + paths: ['**.dart', '**.yaml', '**.yml'] |
| 8 | + pull_request: |
| 9 | + branches: [master] |
| 10 | + paths: ['**.dart', '**.yaml', '**.yml'] |
| 11 | + |
| 12 | +jobs: |
| 13 | + test: |
| 14 | + strategy: |
| 15 | + matrix: |
| 16 | + os: [ubuntu-latest, macos-latest, windows-latest] |
| 17 | + sdk: ['stable', '2.19.0', 'beta'] |
| 18 | + platform: ['vm', 'node'] |
| 19 | + runs-on: ${{ matrix.os }} |
| 20 | + steps: |
| 21 | + - uses: actions/checkout@v4 |
| 22 | + |
| 23 | + - uses: dart-lang/setup-dart@v1 |
| 24 | + with: |
| 25 | + sdk: ${{ matrix.sdk }} |
| 26 | + |
| 27 | + - name: Install dependencies |
| 28 | + run: dart pub get |
| 29 | + |
| 30 | + - name: Verify formatting |
| 31 | + run: dart format --output=none --set-exit-if-changed . |
| 32 | + |
| 33 | + - name: Analyze project source |
| 34 | + run: dart analyze --fatal-infos |
| 35 | + |
| 36 | + - name: Text on ${{ matrix.platform }} |
| 37 | + run: dart test -p ${{ matrix.platform }} |
| 38 | + |
| 39 | + pana: |
| 40 | + if: github.repository == 'bitanon/hashlib_codecs' |
| 41 | + runs-on: ubuntu-latest |
| 42 | + steps: |
| 43 | + - uses: actions/checkout@v4 |
| 44 | + - uses: dart-lang/setup-dart@v1 |
| 45 | + |
| 46 | + - name: Install pana |
| 47 | + run: dart pub global activate pana |
| 48 | + |
| 49 | + - name: Verify with pana |
| 50 | + run: pana --exit-code-threshold 0 |
| 51 | + |
| 52 | + coverage: |
| 53 | + if: github.repository == 'bitanon/hashlib_codecs' |
| 54 | + runs-on: ubuntu-latest |
| 55 | + steps: |
| 56 | + - uses: actions/checkout@v4 |
| 57 | + - uses: dart-lang/setup-dart@v1 |
| 58 | + |
| 59 | + - name: 'Install global packages' |
| 60 | + run: | |
| 61 | + dart pub global activate coverage |
| 62 | + dart pub global activate cobertura |
| 63 | + dart pub global activate junitreport |
| 64 | +
|
| 65 | + - name: Generate coverage |
| 66 | + run: bash ./scripts/coverage.sh |
| 67 | + |
| 68 | + - name: Upload coverage |
| 69 | + uses: codecov/codecov-action@v4 |
| 70 | + with: |
| 71 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 72 | + file: ./coverage/cobertura.xml |
| 73 | + |
| 74 | + - name: Upload test results |
| 75 | + if: ${{ !cancelled() }} |
| 76 | + uses: codecov/test-results-action@v1 |
| 77 | + with: |
| 78 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 79 | + file: ./coverage/junit.xml |
0 commit comments