mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-09-05 20:44:30 +08:00
Merge assets into main, have epmdless as its own check (#2592)
This commit is contained in:
parent
3b5a3fb22e
commit
9328123cab
1 changed files with 53 additions and 31 deletions
84
.github/workflows/test.yml
vendored
84
.github/workflows/test.yml
vendored
|
@ -6,17 +6,10 @@ on:
|
|||
- main
|
||||
- "v*.*"
|
||||
jobs:
|
||||
linux:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
MIX_ENV: test
|
||||
strategy:
|
||||
matrix:
|
||||
build:
|
||||
- name: default
|
||||
- name: epmdless
|
||||
env: LIVEBOOK_EPMDLESS=true ELIXIR_ERL_OPTIONS="-epmd_module Elixir.Livebook.EPMD -start_epmd false -erl_epmd_port 0"
|
||||
|
||||
steps:
|
||||
- name: Checkout git repo
|
||||
uses: actions/checkout@v3
|
||||
|
@ -48,6 +41,58 @@ jobs:
|
|||
run: mix compile --warnings-as-errors
|
||||
- name: Run tests
|
||||
run: mix test
|
||||
- name: Install Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "18.x"
|
||||
- name: Cache npm dependencies
|
||||
uses: actions/cache@v3
|
||||
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
|
||||
|
||||
epmdless:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'push'
|
||||
env:
|
||||
MIX_ENV: test
|
||||
LIVEBOOK_EPMDLESS: true
|
||||
ELIXIR_ERL_OPTIONS: "-epmd_module Elixir.Livebook.EPMD -start_epmd false -erl_epmd_port 0"
|
||||
steps:
|
||||
- name: Checkout git repo
|
||||
uses: actions/checkout@v3
|
||||
- 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@v3
|
||||
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: Run tests
|
||||
run: mix test
|
||||
|
||||
windows:
|
||||
runs-on: windows-latest
|
||||
|
@ -125,26 +170,3 @@ jobs:
|
|||
key: ${{ runner.os }}-elixir-${{ env.elixir }}
|
||||
- name: Build the app
|
||||
run: .github/scripts/app/build_macos.sh
|
||||
|
||||
assets:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout git repo
|
||||
uses: actions/checkout@v3
|
||||
- name: Install Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "18.x"
|
||||
- name: Cache npm dependencies
|
||||
uses: actions/cache@v3
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue