77jobs :
88 tests :
99 runs-on : ${{matrix.os}}
10- name : Test (${{matrix.os}})
10+ name : Test (${{matrix.os}}) - spitfire=${{matrix.spitfire}}
1111
1212 strategy :
1313 matrix :
14+ spitfire : [0, 1]
1415 os :
1516 - ubuntu-latest
1617 - macos-14
1718
1819 steps :
1920 - uses : actions/checkout@v4
20- - uses : jdx/mise-action@v2
21+ - uses : DeterminateSystems/nix-installer-action@main
22+ - uses : DeterminateSystems/magic-nix-cache-action@main
23+
2124 - uses : actions/cache@v4
2225 with :
2326 path : |
2427 deps
2528 _build
26- key : ${{ matrix.os }}-mix-${{ hashFiles('**/.mise.toml ') }}-${{ hashFiles('**/mix.lock') }}
29+ key : ${{ matrix.os }}-mix-${{ hashFiles('**/flake.nix ') }}-${{ hashFiles('**/mix.lock') }}
2730 restore-keys : |
28- ${{ matrix.os }}-mix-${{ hashFiles('**/.mise.toml ') }}-
31+ ${{ matrix.os }}-mix-${{ hashFiles('**/flake.nix ') }}-
2932
3033 - name : Install Dependencies
31- run : mix deps.get
34+ run : nix develop --command bash -c ' mix deps.get'
3235
3336 - name : Start EPMD
34- run : epmd -daemon
37+ run : nix develop --command bash -c ' epmd -daemon'
3538
3639 - name : Compile
3740 env :
3841 MIX_ENV : test
39- run : mix compile
42+ run : nix develop --command bash -c ' mix compile'
4043
4144 - name : remove tmp dir
4245 run : rm -rf tmp
4346
4447 - name : Run Tests
45- run : elixir --erl '-kernel prevent_overlapping_partitions false' -S mix test --max-cases 1
48+ env :
49+ NEXTLS_SPITFIRE_ENABLED : ${{ matrix.spitfire }}
50+ run : nix develop --command bash -c "elixir --erl '-kernel prevent_overlapping_partitions false' -S mix test --max-cases 1"
4651
4752 formatter :
4853 runs-on : ubuntu-latest
4954 name : Formatter
5055
5156 steps :
5257 - uses : actions/checkout@v4
53- - uses : jdx/mise-action@v2
58+ - uses : DeterminateSystems/nix-installer-action@main
59+ - uses : DeterminateSystems/magic-nix-cache-action@main
5460 - uses : actions/cache@v4
5561 with :
5662 path : |
5763 deps
5864 _build
59- key : ${{ runner.os }}-mix-${{ hashFiles('**/.mise.toml ') }}-${{ hashFiles('**/mix.lock') }}
65+ key : ${{ runner.os }}-mix-${{ hashFiles('**/flake.nix ') }}-${{ hashFiles('**/mix.lock') }}
6066 restore-keys : |
61- ${{ runner.os }}-mix-${{ hashFiles('**/.mise.toml ') }}-
67+ ${{ runner.os }}-mix-${{ hashFiles('**/flake.nix ') }}-
6268
6369 - name : Install Dependencies
64- run : mix deps.get
70+ run : nix develop --command bash -c ' mix deps.get'
6571
6672 - name : Run Formatter
67- run : mix format --check-formatted
73+ run : nix develop --command bash -c ' mix format --check-formatted'
6874
6975 dialyzer :
7076 runs-on : ubuntu-latest
7177 steps :
7278 - uses : actions/checkout@v4
73- - uses : jdx/mise-action@v2
79+ - uses : DeterminateSystems/nix-installer-action@main
80+ - uses : DeterminateSystems/magic-nix-cache-action@main
7481
7582 # Don't cache PLTs based on mix.lock hash, as Dialyzer can incrementally update even old ones
7683 # Cache key based on Elixir & Erlang version (also useful when running in matrix)
7784 - name : Restore PLT cache
7885 uses : actions/cache/restore@v4
7986 id : plt_cache
8087 with :
81- key : ${{ runner.os }}-mix-${{ hashFiles('**/.mise.toml ') }}-${{ hashFiles('**/mix.lock') }}
88+ key : ${{ runner.os }}-mix-${{ hashFiles('**/flake.nix ') }}-${{ hashFiles('**/mix.lock') }}
8289 restore-keys : |
83- ${{ runner.os }}-mix-${{ hashFiles('**/.mise.toml ') }}-
90+ ${{ runner.os }}-mix-${{ hashFiles('**/flake.nix ') }}-
8491 path : |
8592 priv/plts
8693
8794 - name : Install Dependencies
88- run : mix deps.get
95+ run : nix develop --command bash -c ' mix deps.get'
8996
9097 # Create PLTs if no cache was found
9198 - name : Create PLTs
9299 if : steps.plt_cache.outputs.cache-hit != 'true'
93- run : mix dialyzer --plt
100+ run : nix develop --command bash -c ' mix dialyzer --plt'
94101
95102 # By default, the GitHub Cache action will only save the cache if all steps in the job succeed,
96103 # so we separate the cache restore and save steps in case running dialyzer fails.
@@ -99,12 +106,12 @@ jobs:
99106 if : steps.plt_cache.outputs.cache-hit != 'true'
100107 id : plt_cache_save
101108 with :
102- key : ${{ runner.os }}-mix-${{ hashFiles('**/.mise.toml ') }}-${{ hashFiles('**/mix.lock') }}
109+ key : ${{ runner.os }}-mix-${{ hashFiles('**/flake.nix ') }}-${{ hashFiles('**/mix.lock') }}
103110 path : |
104111 priv/plts
105112
106113 - name : Run dialyzer
107- run : mix dialyzer --format github
114+ run : nix develop --command bash -c ' mix dialyzer --format github'
108115
109116 release-test :
110117 runs-on : ${{matrix.os.name}}
0 commit comments