-
Notifications
You must be signed in to change notification settings - Fork 105
61 lines (61 loc) · 1.74 KB
/
test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Test
on:
pull_request:
push:
branches:
- main
env:
MIX_ENV: test
XLA_CACHE_DIR: ${{ github.workspace }}/cache/xla
LIBTORCH_DIR: ${{ github.workspace }}/cache/torch
jobs:
codespell:
runs-on: ubuntu-latest
steps:
- uses: codespell-project/actions-codespell@v2
with:
skip: deps
ignore_words_list: whn,ehr
main:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- otp: "26.1.1"
elixir: "1.15.6"
lint: true
- otp: "25.3.2.6"
elixir: "1.14.5"
- otp: "25.3.2.6"
elixir: "1.14.5"
test_command_prepend: "USE_EXLA=true"
- otp: "25.3.2.6"
elixir: "1.14.5"
test_command_prepend: "USE_TORCHX=true"
steps:
- uses: actions/checkout@v3
- name: Install Erlang & Elixir
uses: erlef/setup-beam@v1
with:
otp-version: "${{ matrix.otp }}"
elixir-version: "${{ matrix.elixir }}"
- uses: actions/cache@v3
with:
path: |
deps
_build
cache
key: ${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.test_command_prepend }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-
- name: Install mix dependencies
run: mix deps.get
- name: Check formatting
if: ${{ matrix.lint }}
run: mix format --check-formatted
- name: Check unused deps
if: ${{ matrix.lint }}
run: mix deps.unlock --check-unused
- name: Run tests
run: ${{ matrix.test_command_prepend }} mix do compile --skip-optional-deps --warnings-as-errors, test