|
9 | 9 | - master
|
10 | 10 |
|
11 | 11 | jobs:
|
12 |
| - mix_test: |
13 |
| - name: mix test (Elixir ${{matrix.elixir}} | Erlang/OTP ${{matrix.otp}}) |
| 12 | + # Quick smoke test with latest versions |
| 13 | + smoke_test: |
| 14 | + name: Smoke test (Elixir ${{matrix.elixir}} | OTP ${{matrix.otp}}) |
14 | 15 | runs-on: ubuntu-22.04
|
| 16 | + strategy: |
| 17 | + matrix: |
| 18 | + include: |
| 19 | + - elixir: 1.18.x |
| 20 | + otp: 27.x |
| 21 | + steps: |
| 22 | + - uses: actions/checkout@v4 |
| 23 | + - uses: erlef/setup-beam@v1 |
| 24 | + with: |
| 25 | + otp-version: ${{matrix.otp}} |
| 26 | + elixir-version: ${{matrix.elixir}} |
| 27 | + - name: Cache dependencies |
| 28 | + uses: actions/cache@v4 |
| 29 | + with: |
| 30 | + path: | |
| 31 | + _build |
| 32 | + deps |
| 33 | + key: ${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles('**/mix.lock') }} |
| 34 | + restore-keys: | |
| 35 | + ${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}- |
| 36 | + - name: Install Dependencies |
| 37 | + run: | |
| 38 | + mix local.hex --force |
| 39 | + mix local.rebar --force |
| 40 | + mix deps.get --only test |
| 41 | + - run: mix test |
| 42 | + |
| 43 | + # Core compatibility matrix - test minimum, LTS, and latest versions |
| 44 | + compatibility_test: |
| 45 | + name: Compatibility test (Elixir ${{matrix.elixir}} | OTP ${{matrix.otp}} | ${{matrix.os}}) |
| 46 | + runs-on: ${{matrix.os}} |
| 47 | + needs: smoke_test # Only run if smoke test passes |
15 | 48 | strategy:
|
16 | 49 | fail-fast: false
|
17 | 50 | matrix:
|
18 | 51 | include:
|
19 |
| - # No installer available on ubuntu-22.04 |
20 |
| - # - elixir: 1.14.x |
21 |
| - # otp: 23.x |
22 |
| - # tests_may_fail: false |
| 52 | + # Minimum supported versions |
23 | 53 | - elixir: 1.14.x
|
24 | 54 | otp: 24.x
|
25 |
| - tests_may_fail: false |
26 |
| - - elixir: 1.14.x |
27 |
| - otp: 25.x |
28 |
| - tests_may_fail: false |
| 55 | + os: ubuntu-22.04 |
29 | 56 | - elixir: 1.14.x
|
30 |
| - otp: 26.x |
31 |
| - tests_may_fail: false |
32 |
| - - elixir: 1.15.x |
33 |
| - otp: 24.x |
34 |
| - tests_may_fail: false |
35 |
| - - elixir: 1.15.x |
36 |
| - otp: 25.x |
37 |
| - tests_may_fail: false |
38 |
| - - elixir: 1.15.x |
39 |
| - otp: 26.x |
40 |
| - tests_may_fail: false |
41 |
| - - elixir: 1.16.x |
42 | 57 | otp: 24.x
|
43 |
| - tests_may_fail: false |
44 |
| - - elixir: 1.16.x |
45 |
| - otp: 25.x |
46 |
| - tests_may_fail: false |
| 58 | + os: windows-2022 |
| 59 | + # Middle versions |
47 | 60 | - elixir: 1.16.x
|
48 | 61 | otp: 26.x
|
49 |
| - tests_may_fail: false |
50 |
| - - elixir: 1.17.x |
51 |
| - otp: 25.x |
52 |
| - tests_may_fail: false |
53 |
| - - elixir: 1.17.x |
| 62 | + os: ubuntu-22.04 |
| 63 | + - elixir: 1.16.x |
54 | 64 | otp: 26.x
|
55 |
| - tests_may_fail: false |
56 |
| - - elixir: 1.17.x |
57 |
| - otp: 27.x |
58 |
| - tests_may_fail: false |
59 |
| - - elixir: 1.18.x |
60 |
| - otp: 25.x |
61 |
| - tests_may_fail: false |
| 65 | + os: windows-2022 |
| 66 | + # Latest versions |
62 | 67 | - elixir: 1.18.x
|
63 |
| - otp: 26.x |
64 |
| - tests_may_fail: false |
| 68 | + otp: 27.x |
| 69 | + os: ubuntu-22.04 |
65 | 70 | - elixir: 1.18.x
|
66 | 71 | otp: 27.x
|
67 |
| - tests_may_fail: false |
| 72 | + os: windows-2022 |
68 | 73 | env:
|
69 | 74 | MIX_ENV: test
|
70 | 75 | steps:
|
| 76 | + - name: Set git to use original line ending (Windows) |
| 77 | + if: runner.os == 'Windows' |
| 78 | + run: git config --global core.autocrlf false |
71 | 79 | - uses: actions/checkout@v4
|
72 | 80 | - uses: erlef/setup-beam@v1
|
73 | 81 | with:
|
74 | 82 | otp-version: ${{matrix.otp}}
|
75 | 83 | elixir-version: ${{matrix.elixir}}
|
| 84 | + - name: Cache dependencies |
| 85 | + uses: actions/cache@v4 |
| 86 | + with: |
| 87 | + path: | |
| 88 | + _build |
| 89 | + deps |
| 90 | + key: ${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles('**/mix.lock') }} |
| 91 | + restore-keys: | |
| 92 | + ${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}- |
76 | 93 | - name: Install Dependencies
|
77 | 94 | run: |
|
78 | 95 | mix local.hex --force
|
79 | 96 | mix local.rebar --force
|
80 | 97 | mix deps.get --only test
|
81 | 98 | - run: mix test
|
82 |
| - continue-on-error: ${{ matrix.tests_may_fail }} |
83 | 99 |
|
84 |
| - mix_test_windows: |
85 |
| - name: mix test windows (Elixir ${{matrix.elixir}} | Erlang/OTP ${{matrix.otp}}) |
86 |
| - runs-on: windows-2022 |
| 100 | + # Comprehensive matrix - only run on master branch or when specifically requested |
| 101 | + comprehensive_test: |
| 102 | + name: Comprehensive test (Elixir ${{matrix.elixir}} | OTP ${{matrix.otp}}) |
| 103 | + runs-on: ubuntu-22.04 |
| 104 | + if: github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'comprehensive-tests') |
87 | 105 | strategy:
|
88 | 106 | fail-fast: false
|
89 | 107 | matrix:
|
90 | 108 | include:
|
91 |
| - - elixir: 1.14.x |
92 |
| - otp: 23.x |
93 |
| - tests_may_fail: false |
94 | 109 | - elixir: 1.14.x
|
95 | 110 | otp: 24.x
|
96 |
| - tests_may_fail: false |
97 | 111 | - elixir: 1.14.x
|
98 | 112 | otp: 25.x
|
99 |
| - tests_may_fail: false |
100 | 113 | - elixir: 1.14.x
|
101 | 114 | otp: 26.x
|
102 |
| - tests_may_fail: false |
103 | 115 | - elixir: 1.15.x
|
104 | 116 | otp: 24.x
|
105 |
| - tests_may_fail: false |
106 | 117 | - elixir: 1.15.x
|
107 | 118 | otp: 25.x
|
108 |
| - tests_may_fail: false |
109 | 119 | - elixir: 1.15.x
|
110 | 120 | otp: 26.x
|
111 |
| - tests_may_fail: false |
112 | 121 | - elixir: 1.16.x
|
113 | 122 | otp: 24.x
|
114 |
| - tests_may_fail: false |
115 | 123 | - elixir: 1.16.x
|
116 | 124 | otp: 25.x
|
117 |
| - tests_may_fail: false |
118 | 125 | - elixir: 1.16.x
|
119 | 126 | otp: 26.x
|
120 |
| - tests_may_fail: false |
121 | 127 | - elixir: 1.17.x
|
122 | 128 | otp: 25.x
|
123 |
| - tests_may_fail: false |
124 | 129 | - elixir: 1.17.x
|
125 | 130 | otp: 26.x
|
126 |
| - tests_may_fail: false |
127 | 131 | - elixir: 1.17.x
|
128 | 132 | otp: 27.x
|
129 |
| - tests_may_fail: false |
130 | 133 | - elixir: 1.18.x
|
131 | 134 | otp: 25.x
|
132 |
| - tests_may_fail: false |
133 | 135 | - elixir: 1.18.x
|
134 | 136 | otp: 26.x
|
135 |
| - tests_may_fail: false |
136 | 137 | - elixir: 1.18.x
|
137 | 138 | otp: 27.x
|
138 |
| - tests_may_fail: false |
139 | 139 | env:
|
140 | 140 | MIX_ENV: test
|
141 | 141 | steps:
|
142 |
| - - name: Set git to use original line ending |
143 |
| - run: | |
144 |
| - git config --global core.autocrlf false |
145 | 142 | - uses: actions/checkout@v4
|
146 | 143 | - uses: erlef/setup-beam@v1
|
147 | 144 | with:
|
148 | 145 | otp-version: ${{matrix.otp}}
|
149 | 146 | elixir-version: ${{matrix.elixir}}
|
| 147 | + - name: Cache dependencies |
| 148 | + uses: actions/cache@v4 |
| 149 | + with: |
| 150 | + path: | |
| 151 | + _build |
| 152 | + deps |
| 153 | + key: ${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles('**/mix.lock') }} |
| 154 | + restore-keys: | |
| 155 | + ${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}- |
150 | 156 | - name: Install Dependencies
|
151 | 157 | run: |
|
152 | 158 | mix local.hex --force
|
153 | 159 | mix local.rebar --force
|
154 | 160 | mix deps.get --only test
|
155 | 161 | - run: mix test
|
156 |
| - continue-on-error: ${{ matrix.tests_may_fail }} |
157 | 162 |
|
158 | 163 | static_analysis:
|
159 |
| - name: static analysis (Elixir ${{matrix.elixir}} | Erlang/OTP ${{matrix.otp}}) |
| 164 | + name: Static analysis |
160 | 165 | runs-on: ubuntu-22.04
|
161 |
| - strategy: |
162 |
| - matrix: |
163 |
| - include: |
164 |
| - - elixir: 1.18.x |
165 |
| - otp: 27.x |
166 | 166 | steps:
|
167 | 167 | - uses: actions/checkout@v4
|
168 | 168 | - uses: erlef/setup-beam@v1
|
169 | 169 | with:
|
170 |
| - otp-version: ${{matrix.otp}} |
171 |
| - elixir-version: ${{matrix.elixir}} |
| 170 | + otp-version: 27.x |
| 171 | + elixir-version: 1.18.x |
172 | 172 | - name: Cache build artifacts
|
173 | 173 | uses: actions/cache@v4
|
174 | 174 | with:
|
175 | 175 | path: |
|
176 | 176 | ~/.hex
|
177 | 177 | ~/.mix
|
178 | 178 | _build
|
179 |
| - key: ${{ matrix.otp }}-${{ matrix.elixir }}-static_analysis-build |
| 179 | + deps |
| 180 | + key: static-analysis-${{ hashFiles('**/mix.lock') }} |
| 181 | + restore-keys: | |
| 182 | + static-analysis- |
180 | 183 | - name: Install Dependencies
|
181 | 184 | run: |
|
182 | 185 | mix local.hex --force
|
|
0 commit comments