Skip to content

Commit 0f72024

Browse files
Run CI without mix.lock
1 parent b2263ee commit 0f72024

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

.github/workflows/test.yml

+18-11
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
branches: [ main ]
66
pull_request:
77
workflow_dispatch:
8+
schedule:
9+
- cron: '0 4 * * 2,6'
810

911
jobs:
1012
test:
@@ -13,22 +15,23 @@ jobs:
1315
strategy:
1416
fail-fast: false
1517
matrix:
16-
include:
18+
versions:
1719
- elixir: '1.13.2'
1820
otp: '24.1'
19-
current_version: false
21+
with_linting: false
2022
- elixir: '1.14.0'
2123
otp: '25.0'
22-
current_version: false
24+
with_linting: false
2325
- elixir: '1.15.0'
2426
otp: '26.0'
25-
current_version: true
27+
with_linting: true
2628
- elixir: '1.16.0'
2729
otp: '26.2'
28-
current_version: true
30+
with_linting: true
2931
- elixir: '1.17.0'
3032
otp: '27.0'
31-
current_version: true
33+
with_linting: true
34+
mix_lock: ['with_mix_lock', 'without_mix_lock']
3235

3336
steps:
3437
- name: Checkout code
@@ -37,8 +40,8 @@ jobs:
3740
- name: Use Elixir
3841
uses: erlef/setup-beam@a34c98fd51e370b4d4981854aba1eb817ce4e483
3942
with:
40-
otp-version: ${{matrix.otp}}
41-
elixir-version: ${{matrix.elixir}}
43+
otp-version: ${{matrix.versions.otp}}
44+
elixir-version: ${{matrix.versions.elixir}}
4245

4346
- name: Set cache key
4447
id: set_cache_key
@@ -57,8 +60,12 @@ jobs:
5760
path: deps
5861
key: mix-${{ steps.set_cache_key.outputs.cache_key }}-v1
5962

63+
- name: Unlock Mix Dependencies
64+
if: matrix.mix_lock == 'without_mix_lock'
65+
run: mix deps.unlock --all
66+
6067
- name: Install Mix Dependencies
61-
if: steps.mix-cache.outputs.cache-hit != 'true'
68+
if: steps.mix-cache.outputs.cache-hit != 'true' || matrix.mix_lock == 'without_mix_lock'
6269
run: mix deps.get
6370

6471
- name: Build Project
@@ -97,11 +104,11 @@ jobs:
97104

98105
- name: Run Dialyzer
99106
run: mix dialyzer
100-
if: ${{ matrix.current_version }}
107+
if: ${{ matrix.versions.with_linting }}
101108

102109
- name: Run format check
103110
run: mix format --check-formatted
104-
if: ${{ matrix.current_version }}
111+
if: ${{ matrix.versions.with_linting }}
105112

106113
all_tests_passing:
107114
if: ${{ always() }}

0 commit comments

Comments
 (0)