Skip to content

fix(ctl): fix actor file error log #1702

fix(ctl): fix actor file error log

fix(ctl): fix actor file error log #1702

Workflow file for this run

name: HostCore Elixir CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
MIX_ENV: test
working-directory: host_core
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-2019, macos-11]
elixir: [1.14.3]
otp: [25]
name: Build and test
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
# Install Rust
- run: rustup toolchain install stable --profile minimal
# Install erlang/OTP and elixir
- name: Install erlang and elixir
if: ${{ startswith(matrix.os, 'ubuntu') || startswith(matrix.os, 'windows') }}
uses: erlef/setup-beam@v1
with:
otp-version: "=${{ matrix.otp }}"
elixir-version: ${{ matrix.elixir }}
install-hex: true
install-rebar: true
- name: Install erlang and elixir
if: ${{ startswith(matrix.os, 'macos') }}
run: |
brew install erlang
brew install elixir
# If dependencies aren't changing, retrieve cache
- name: Retrieve Mix Dependencies Cache
uses: actions/cache@v2
id: mix-cache #id to use in retrieve action
with:
path: |
host_core/deps
host_core/_build
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles('host_core/mix.exs', 'host_core/mix.lock') }}
# Cache Rust builds
- uses: Swatinem/rust-cache@v2
with:
cache-directories: "host_core/native/hostcore_wasmcloud_native/target"
- name: Install Rebar and Hex
working-directory: ${{env.working-directory}}
run: |
mix local.rebar --force
mix local.hex --force
- name: Install Mix Dependencies
working-directory: ${{env.working-directory}}
if: steps.mix-cache.outputs.cache-hit != 'true'
run: |
mix do deps.get, deps.compile
- name: Check Formatting
if: ${{ !startswith(matrix.os, 'windows') }} # Windows gets angry about carriage returns
working-directory: ${{env.working-directory}}
run: mix format --check-formatted
- name: Run Credo
working-directory: ${{env.working-directory}}
continue-on-error: true # Don't fail entire action with refactoring opportunities for now
run: mix credo --strict
- name: Run Tests
if: ${{ startswith(matrix.os, 'ubuntu') }} # Run on Ubuntu only as a temporary workaround to dependencies that aren't present on windows/mac runners
working-directory: ${{env.working-directory}}
env:
EXTRA_TEST_ARGS: "--timeout 120000"
WASMCLOUD_RPC_TIMEOUT_MS: 3000
MIX_ENV: test
run: |
WASMCLOUD_LATTICE_PREFIX=$(echo "${{ runner.os }}__${{ matrix.otp }}__${{ matrix.elixir }}__${{ env.working-directory }}" | sed 's/\./_/g') \
make test
- name: Retrieve PLT Cache
uses: actions/cache@v2
id: plt-cache
with:
path: host_core/priv/plts
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-plts-${{ hashFiles('host_core/mix.exs', 'host_core/mix.lock') }}
- name: Create PLTs
if: steps.plt-cache.outputs.cache-hit != 'true' && !startswith(matrix.os, 'windows')
working-directory: ${{env.working-directory}}
run: |
mkdir -p priv/plts
mix dialyzer --plt
- name: Run dialyzer
if: ${{ !startswith(matrix.os, 'windows') }}
working-directory: ${{env.working-directory}}
run: mix dialyzer
# Thank you https://hashrocket.com/blog/posts/build-the-ultimate-elixir-ci-with-github-actions for this action setup