Skip to content

Allow a leaving channel to shut down gracefully #7365

Allow a leaving channel to shut down gracefully

Allow a leaving channel to shut down gracefully #7365

Workflow file for this run

name: CI
on: [push, pull_request]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
mix_test:
name: mix test (OTP ${{matrix.otp}} | Elixir ${{matrix.elixir}})
env:
MIX_ENV: test
PHX_CI: true
strategy:
matrix:
include:
- elixir: "1.15.8"
otp: "25.3.2.21"
- elixir: "1.18.4"
otp: "27.3.4.13"
- elixir: "1.20.4"
otp: "29.0.5"
lint: true
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Elixir
uses: erlef/setup-beam@54075bcc5e249e4758d363f27d099f55d843f124 # v1.24.1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- name: Restore deps and _build cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
deps
_build
key: deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}
- name: Install dependencies
run: mix deps.get --only test
- name: Remove compiled application files
run: mix clean
- name: Compile & lint dependencies
run: mix compile --warnings-as-errors
if: ${{ matrix.lint }}
- name: Run tests
run: mix test
if: ${{ !matrix.lint }}
- name: Run tests & lint
run: mix test --warnings-as-errors
if: ${{ matrix.lint }}
installer_test:
name: installer test (OTP ${{matrix.otp}} | Elixir ${{matrix.elixir}})
env:
MIX_ENV: test
PHX_CI: true
strategy:
matrix:
include:
- elixir: "1.18.4"
otp: "27.3.4.3"
- elixir: "1.20.4"
otp: "29.0.5"
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Elixir
uses: erlef/setup-beam@54075bcc5e249e4758d363f27d099f55d843f124 # v1.24.1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- name: Restore deps and _build cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
deps
_build
key: deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}
- name: Install installer dependencies
run: mix deps.get
working-directory: installer
- name: Run installer unit tests
run: mix test
working-directory: installer
- name: Install root dependencies
run: mix deps.get --only test
- name: Run mix_phx_new generator integration tests
run: mix test --only mix_phx_new
npm_test:
name: npm test
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Restore deps and _build cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
deps
_build
key: deps-${{ runner.os }}-npm-${{ hashFiles('**/mix.lock') }}
restore-keys: |
deps-${{ runner.os }}-npm
- name: Set up Node.js 24.x
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24.x
- name: Restore npm cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install locked npm dependencies
run: npm ci
- name: Run tests
run: npm test
docs:
name: mix docs
env:
MIX_ENV: docs
strategy:
matrix:
include:
- elixir: "1.20.4"
otp: "29.0.5"
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Elixir
uses: erlef/setup-beam@54075bcc5e249e4758d363f27d099f55d843f124 # v1.24.1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
# the docs alias also builds the JavaScript documentation with npm
- name: Set up Node.js 24.x
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24.x
- name: Restore deps and _build cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
deps
_build
key: docs-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
docs-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}
- name: Restore npm cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: mix deps.get --only docs
- name: Build the documentation
run: mix docs --warnings-as-errors
integration-test-elixir:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
include:
# look for latest alpine image here: https://bob.hex.pm/docker?repo=hexpm/elixir&os=alpine&sort=elixir_version,erlang_version,os_version
- elixir: "1.18.4"
otp: "27.3.4.3"
suffix: "alpine-3.22.4"
- elixir: "1.20.4"
otp: "29.0.5"
suffix: "alpine-3.23.5"
container:
image: hexpm/elixir:${{ matrix.elixir }}-erlang-${{ matrix.otp }}-${{ matrix.suffix }}
env:
ELIXIR_ASSERT_TIMEOUT: 10000
PHX_CI: true
services:
postgres:
image: postgres:18
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres
mysql:
image: mysql:26
ports:
- 3306:3306
env:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
mssql:
image: mcr.microsoft.com/mssql/server:2019-latest
env:
ACCEPT_EULA: Y
SA_PASSWORD: some!Password
ports:
- 1433:1433
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Run test script
run: ./integration_test/test.sh