|
5 | 5 | branches: [ main ]
|
6 | 6 | pull_request:
|
7 | 7 | workflow_dispatch:
|
| 8 | + schedule: |
| 9 | + - cron: '0 4 * * 2,6' |
8 | 10 |
|
9 | 11 | jobs:
|
10 | 12 | test:
|
| 13 | + name: Text (Elixir ${{matrix.versions.elixir}}, OTP ${{matrix.versions.otp}}, ${{matrix.mix_lock}}, ${{matrix.linting}}) |
11 | 14 | runs-on: ubuntu-20.04
|
12 | 15 | continue-on-error: false
|
13 | 16 | strategy:
|
14 | 17 | fail-fast: false
|
15 | 18 | matrix:
|
16 |
| - include: |
| 19 | + versions: |
17 | 20 | - elixir: '1.13.2'
|
18 | 21 | otp: '24.1'
|
19 |
| - current_version: false |
| 22 | + linting: 'without_linting' |
20 | 23 | - elixir: '1.14.0'
|
21 | 24 | otp: '25.0'
|
22 |
| - current_version: false |
| 25 | + linting: 'without_linting' |
23 | 26 | - elixir: '1.15.0'
|
24 | 27 | otp: '26.0'
|
25 |
| - current_version: true |
| 28 | + linting: 'with_linting' |
26 | 29 | - elixir: '1.16.0'
|
27 | 30 | otp: '26.2'
|
28 |
| - current_version: true |
| 31 | + linting: 'with_linting' |
29 | 32 | - elixir: '1.17.0'
|
30 | 33 | otp: '27.0'
|
31 |
| - current_version: true |
| 34 | + linting: 'with_linting' |
| 35 | + mix_lock: ['with_mix_lock', 'without_mix_lock'] |
| 36 | + exclude: |
| 37 | + - mix_lock: ${{ github.event.schedule && 'with_mix_lock' }} |
| 38 | + - mix_lock: 'without_mix_lock' |
| 39 | + linting: 'with_linting' |
32 | 40 |
|
33 | 41 | steps:
|
34 | 42 | - name: Checkout code
|
|
37 | 45 | - name: Use Elixir
|
38 | 46 | uses: erlef/setup-beam@a34c98fd51e370b4d4981854aba1eb817ce4e483
|
39 | 47 | with:
|
40 |
| - otp-version: ${{matrix.otp}} |
41 |
| - elixir-version: ${{matrix.elixir}} |
| 48 | + otp-version: ${{matrix.versions.otp}} |
| 49 | + elixir-version: ${{matrix.versions.elixir}} |
42 | 50 |
|
43 | 51 | - name: Set cache key
|
44 | 52 | id: set_cache_key
|
|
57 | 65 | path: deps
|
58 | 66 | key: mix-${{ steps.set_cache_key.outputs.cache_key }}-v1
|
59 | 67 |
|
| 68 | + - name: Unlock Mix Dependencies |
| 69 | + if: matrix.mix_lock == 'without_mix_lock' |
| 70 | + run: mix deps.unlock --all |
| 71 | + |
60 | 72 | - name: Install Mix Dependencies
|
61 |
| - if: steps.mix-cache.outputs.cache-hit != 'true' |
| 73 | + if: steps.mix-cache.outputs.cache-hit != 'true' || matrix.mix_lock == 'without_mix_lock' |
62 | 74 | run: mix deps.get
|
63 | 75 |
|
64 | 76 | - name: Build Project
|
@@ -97,11 +109,11 @@ jobs:
|
97 | 109 |
|
98 | 110 | - name: Run Dialyzer
|
99 | 111 | run: mix dialyzer
|
100 |
| - if: ${{ matrix.current_version }} |
| 112 | + if: ${{ matrix.versions.linting == 'with_linting' }} |
101 | 113 |
|
102 | 114 | - name: Run format check
|
103 | 115 | run: mix format --check-formatted
|
104 |
| - if: ${{ matrix.current_version }} |
| 116 | + if: ${{ matrix.versions.linting == 'with_linting' }} |
105 | 117 |
|
106 | 118 | all_tests_passing:
|
107 | 119 | if: ${{ always() }}
|
|
0 commit comments