Skip to content

Commit

Permalink
Up
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatanklosko committed Feb 27, 2025
1 parent c42c5d3 commit 41c4e32
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 85 deletions.
173 changes: 88 additions & 85 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,59 +5,60 @@ on:
branches:
- main
- "v*.*"
- jk-tmp
jobs:
main:
runs-on: ubuntu-latest
env:
MIX_ENV: test
steps:
- name: Checkout git repo
uses: actions/checkout@v4
- name: Read ./versions
run: |
. versions
echo "elixir=$elixir" >> $GITHUB_ENV
echo "otp=$otp" >> $GITHUB_ENV
echo "openssl=$openssl" >> $GITHUB_ENV
- name: Install Erlang & Elixir
uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.otp }}
elixir-version: ${{ env.elixir }}
- name: Cache Mix
uses: actions/cache@v4
with:
path: |
deps
_build
key: ${{ runner.os }}-mix-${{ env.elixir }}-${{ env.otp }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ env.elixir }}-${{ env.otp }}-
- name: Install mix dependencies
run: mix deps.get
- name: Check formatting
run: mix format --check-formatted
- name: Check warnings
run: mix compile --warnings-as-errors
- name: Run tests
run: mix test
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: "20.x"
- name: Cache npm dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install npm dependencies
run: npm ci --prefix assets
- name: Check assets formatting
run: npm run format-check --prefix assets
- name: Run assets tests
run: npm test --prefix assets
# main:
# runs-on: ubuntu-latest
# env:
# MIX_ENV: test
# steps:
# - name: Checkout git repo
# uses: actions/checkout@v4
# - name: Read ./versions
# run: |
# . versions
# echo "elixir=$elixir" >> $GITHUB_ENV
# echo "otp=$otp" >> $GITHUB_ENV
# echo "openssl=$openssl" >> $GITHUB_ENV
# - name: Install Erlang & Elixir
# uses: erlef/setup-beam@v1
# with:
# otp-version: ${{ env.otp }}
# elixir-version: ${{ env.elixir }}
# - name: Cache Mix
# uses: actions/cache@v4
# with:
# path: |
# deps
# _build
# key: ${{ runner.os }}-mix-${{ env.elixir }}-${{ env.otp }}-${{ hashFiles('**/mix.lock') }}
# restore-keys: |
# ${{ runner.os }}-mix-${{ env.elixir }}-${{ env.otp }}-
# - name: Install mix dependencies
# run: mix deps.get
# - name: Check formatting
# run: mix format --check-formatted
# - name: Check warnings
# run: mix compile --warnings-as-errors
# - name: Run tests
# run: mix test
# - name: Install Node
# uses: actions/setup-node@v4
# with:
# node-version: "20.x"
# - name: Cache npm dependencies
# uses: actions/cache@v4
# with:
# path: ~/.npm
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# ${{ runner.os }}-node-
# - name: Install npm dependencies
# run: npm ci --prefix assets
# - name: Check assets formatting
# run: npm run format-check --prefix assets
# - name: Run assets tests
# run: npm test --prefix assets

windows:
runs-on: windows-latest
Expand Down Expand Up @@ -103,37 +104,39 @@ jobs:
- uses: ilammy/msvc-dev-cmd@v1
- name: Install mix dependencies
run: mix deps.get
- name: Run tests
run: mix test
- name: Build the app
run: bash .github/scripts/app/build_windows.sh
- run: MIX_ENV=prod mix escript.build
- run: ./livebook --help
# - name: Run tests
# run: mix test
# - name: Build the app
# run: bash .github/scripts/app/build_windows.sh

macos:
runs-on: macos-latest
if: github.event_name == 'push'
steps:
- name: Checkout git repo
uses: actions/checkout@v4
- name: Read ./versions
run: |
. versions
echo "elixir=$elixir" >> $GITHUB_ENV
echo "otp=$otp" >> $GITHUB_ENV
echo "openssl=$openssl" >> $GITHUB_ENV
- name: Cache Mix Deps
uses: actions/cache@v4
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
- name: Cache Bootstrap OTP
uses: actions/cache@v4
with:
path: elixirkit/otp_bootstrap/_build/otp-rel-${{ env.otp }}-openssl-${{ env.openssl }}-macos-universal
key: ${{ runner.os }}-bootstrap-${{ env.otp }}-${{ hashFiles('elixirkit/otp_bootstrap/build.sh') }}
- name: Cache Elixir
uses: actions/cache@v4
with:
path: _build/elixir-${{ env.elixir }}
key: ${{ runner.os }}-elixir-${{ env.elixir }}
- name: Build the app
run: .github/scripts/app/build_macos.sh
# macos:
# runs-on: macos-latest
# if: github.event_name == 'push'
# steps:
# - name: Checkout git repo
# uses: actions/checkout@v4
# - name: Read ./versions
# run: |
# . versions
# echo "elixir=$elixir" >> $GITHUB_ENV
# echo "otp=$otp" >> $GITHUB_ENV
# echo "openssl=$openssl" >> $GITHUB_ENV
# - name: Cache Mix Deps
# uses: actions/cache@v4
# with:
# path: deps
# key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
# - name: Cache Bootstrap OTP
# uses: actions/cache@v4
# with:
# path: elixirkit/otp_bootstrap/_build/otp-rel-${{ env.otp }}-openssl-${{ env.openssl }}-macos-universal
# key: ${{ runner.os }}-bootstrap-${{ env.otp }}-${{ hashFiles('elixirkit/otp_bootstrap/build.sh') }}
# - name: Cache Elixir
# uses: actions/cache@v4
# with:
# path: _build/elixir-${{ env.elixir }}
# key: ${{ runner.os }}-elixir-${{ env.elixir }}
# - name: Build the app
# run: .github/scripts/app/build_macos.sh
1 change: 1 addition & 0 deletions lib/livebook_cli.ex
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ defmodule LivebookCLI do
archive = Keyword.fetch!(sections, :archive)

file_filter = fn zip_file(name: name) ->
IO.inspect(name)
List.starts_with?(name, in_archive_priv_path)
end

Expand Down

0 comments on commit 41c4e32

Please sign in to comment.