Skip to content

Add Bumblebee.cache_dir/0 for discovering cache location #753

Add Bumblebee.cache_dir/0 for discovering cache location

Add Bumblebee.cache_dir/0 for discovering cache location #753

Workflow file for this run

name: Test
on:
pull_request:
push:
branches:
- main
jobs:
main:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- pair:
elixir: 1.14.0
otp: 24.0
lint: true
env:
MIX_ENV: test
XLA_CACHE_DIR: ${{ github.workspace }}/cache/xla
LIBTORCH_DIR: ${{ github.workspace }}/cache/torch
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.pair.otp }}
elixir-version: ${{ matrix.pair.elixir }}
- 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-
- run: mix deps.get
- run: mix format --check-formatted
if: ${{ matrix.lint }}
- run: mix deps.unlock --check-unused
if: ${{ matrix.lint }}
- run: mix deps.compile
- run: mix compile --warnings-as-errors
if: ${{ matrix.lint }}
- run: mix test
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: test/**/*_test.exs
- name: Changed slow tests
# mix test exits with a non-zero code if there are no matching tests,
# so we make sure we fail only when the test suite fails
run: mix test test/bumblebee_test.exs --only slow --exit-status 100 ${{ env.GIT_DIFF_FILTERED }} || [ $? -ne 100 ]
if: ${{ env.GIT_DIFF_FILTERED != '' }}