Skip to content

Commit b868dd8

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

File tree

1 file changed

+23
-11
lines changed

1 file changed

+23
-11
lines changed

.github/workflows/test.yml

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

911
jobs:
1012
test:
13+
name: Text (Elixir ${{matrix.versions.elixir}}, OTP ${{matrix.versions.otp}}, ${{matrix.mix_lock}}, ${{matrix.linting}})
1114
runs-on: ubuntu-20.04
1215
continue-on-error: false
1316
strategy:
1417
fail-fast: false
1518
matrix:
16-
include:
19+
versions:
1720
- elixir: '1.13.2'
1821
otp: '24.1'
19-
current_version: false
22+
linting: 'without_linting'
2023
- elixir: '1.14.0'
2124
otp: '25.0'
22-
current_version: false
25+
linting: 'without_linting'
2326
- elixir: '1.15.0'
2427
otp: '26.0'
25-
current_version: true
28+
linting: 'with_linting'
2629
- elixir: '1.16.0'
2730
otp: '26.2'
28-
current_version: true
31+
linting: 'with_linting'
2932
- elixir: '1.17.0'
3033
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'
3240

3341
steps:
3442
- name: Checkout code
@@ -37,8 +45,8 @@ jobs:
3745
- name: Use Elixir
3846
uses: erlef/setup-beam@a34c98fd51e370b4d4981854aba1eb817ce4e483
3947
with:
40-
otp-version: ${{matrix.otp}}
41-
elixir-version: ${{matrix.elixir}}
48+
otp-version: ${{matrix.versions.otp}}
49+
elixir-version: ${{matrix.versions.elixir}}
4250

4351
- name: Set cache key
4452
id: set_cache_key
@@ -57,8 +65,12 @@ jobs:
5765
path: deps
5866
key: mix-${{ steps.set_cache_key.outputs.cache_key }}-v1
5967

68+
- name: Unlock Mix Dependencies
69+
if: matrix.mix_lock == 'without_mix_lock'
70+
run: mix deps.unlock --all
71+
6072
- 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'
6274
run: mix deps.get
6375

6476
- name: Build Project
@@ -97,11 +109,11 @@ jobs:
97109

98110
- name: Run Dialyzer
99111
run: mix dialyzer
100-
if: ${{ matrix.current_version }}
112+
if: ${{ matrix.versions.linting == 'with_linting' }}
101113

102114
- name: Run format check
103115
run: mix format --check-formatted
104-
if: ${{ matrix.current_version }}
116+
if: ${{ matrix.versions.linting == 'with_linting' }}
105117

106118
all_tests_passing:
107119
if: ${{ always() }}

0 commit comments

Comments
 (0)