Skip to content

Commit 1928eb9

Browse files
committed
run phoenix integration tests
1 parent c082d43 commit 1928eb9

File tree

1 file changed

+103
-0
lines changed

1 file changed

+103
-0
lines changed
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Phoenix Integration
2+
3+
on:
4+
push:
5+
pull_request:
6+
branches:
7+
- main
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
phoenix-integration:
14+
name: Phoenix Integration (OTP ${{matrix.otp}} | Elixir ${{matrix.elixir}})
15+
runs-on: ubuntu-24.04
16+
17+
strategy:
18+
matrix:
19+
include:
20+
- elixir: 1.15.8
21+
otp: 25.3.2.9
22+
23+
- elixir: 1.18.4
24+
otp: 27.3
25+
26+
- elixir: 1.18.4
27+
otp: 28.1
28+
29+
env:
30+
MIX_ENV: test
31+
PHX_CI: true
32+
ELIXIR_ASSERT_TIMEOUT: 10000
33+
34+
services:
35+
postgres:
36+
image: postgres
37+
ports:
38+
- 5432:5432
39+
env:
40+
POSTGRES_PASSWORD: postgres
41+
mysql:
42+
image: mysql
43+
ports:
44+
- 3306:3306
45+
env:
46+
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
47+
mssql:
48+
image: mcr.microsoft.com/mssql/server:2019-latest
49+
env:
50+
ACCEPT_EULA: Y
51+
SA_PASSWORD: some!Password
52+
ports:
53+
- 1433:1433
54+
55+
steps:
56+
- name: Checkout LiveView
57+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
58+
with:
59+
path: phoenix_live_view
60+
61+
- name: Checkout Phoenix
62+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
63+
with:
64+
repository: phoenixframework/phoenix
65+
path: phoenix
66+
67+
- name: Set up Elixir
68+
uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4
69+
with:
70+
elixir-version: ${{ matrix.elixir }}
71+
otp-version: ${{ matrix.otp }}
72+
73+
- name: Restore deps and _build cache
74+
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
75+
with:
76+
path: |
77+
phoenix/deps
78+
phoenix/_build
79+
key: phoenix-deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('phoenix/**/mix.lock') }}
80+
restore-keys: |
81+
phoenix-deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}
82+
83+
- name: Modify Phoenix integration_test mix.exs to use local LiveView
84+
run: |
85+
cd phoenix/integration_test
86+
# Replace the phoenix_live_view dependency with a path dependency
87+
sed -i 's|{:phoenix_live_view[^}]*}|{:phoenix_live_view, path: "../../phoenix_live_view"}|g' mix.exs
88+
cat mix.exs | grep phoenix_live_view
89+
90+
- name: Install dependencies
91+
run: |
92+
cd phoenix/integration_test
93+
mix deps.get --only test
94+
95+
- name: Remove compiled application files
96+
run: |
97+
cd phoenix/integration_test
98+
mix clean
99+
100+
- name: Run integration tests
101+
run: |
102+
cd phoenix
103+
./integration_test/test.sh

0 commit comments

Comments
 (0)