make attach_hook API compatible with Axon.Node and fix doc example on Axon.map_nodes #1336
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
OTP_VERSION: "25.0" | |
ELIXIR_VERSION: "1.14.0" | |
MIX_ENV: test | |
XLA_CACHE_DIR: ${{ github.workspace }}/cache/xla | |
LIBTORCH_DIR: ${{ github.workspace }}/cache/torch | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Erlang & Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: "${{ env.OTP_VERSION }}" | |
elixir-version: "${{ env.ELIXIR_VERSION }}" | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
deps | |
_build | |
cache | |
key: ${{ runner.os }}-mix-${{ matrix.pair.elixir }}-${{ matrix.pair.otp }}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: | | |
${{ runner.os }}-mix- | |
- name: Install mix dependencies | |
run: mix deps.get | |
- name: Check formatting | |
run: mix format --check-formatted | |
- name: Compile without optional deps | |
run: mix compile --skip-optional-deps --warnings-as-errors | |
- name: Run tests | |
run: mix test | |
exla_check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Erlang & Elixir | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: "${{ env.OTP_VERSION }}" | |
elixir-version: "${{ env.ELIXIR_VERSION }}" | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
deps | |
_build | |
cache | |
key: ${{ runner.os }}-mix-${{ matrix.pair.elixir }}-${{ matrix.pair.otp }}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: | | |
${{ runner.os }}-mix- | |
- name: Install mix dependencies | |
run: mix deps.get | |
- name: Run tests against EXLA | |
run: USE_EXLA=true mix do compile --warnings-as-errors, test | |
torchx_check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Erlang & Elixir | |
uses: erlef/setup-elixir@v1 | |
with: | |
otp-version: "${{ env.OTP_VERSION }}" | |
elixir-version: "${{ env.ELIXIR_VERSION }}" | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
deps | |
_build | |
cache | |
key: ${{ runner.os }}-mix-${{ matrix.pair.elixir }}-${{ matrix.pair.otp }}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: | | |
${{ runner.os }}-mix- | |
- name: Install mix dependencies | |
run: mix deps.get | |
- name: Run tests against Torchx | |
run: USE_TORCHX=true mix do compile --warnings-as-errors, test |