Skip to content

Commit 011e057

Browse files
Add .github/workflows/main.yml
1 parent db04ddd commit 011e057

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/main.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# CI workflow to run mix test
2+
#
3+
# Originally copied from https://github.com/actions/starter-workflows/blob/main/ci/elixir.yml commit cd4b67d
4+
5+
name: PubSub test
6+
7+
on:
8+
push:
9+
branches:
10+
- main
11+
pull_request: {}
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
test:
18+
name: Test on OTP ${{matrix.otp}} + Elixir ${{matrix.elixir}}
19+
runs-on: ubuntu-latest
20+
strategy:
21+
matrix:
22+
otp: ['27']
23+
elixir: ['1.18']
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- name: Set up Elixir
28+
uses: erlef/setup-beam@v1.18.2
29+
with:
30+
otp-version: ${{matrix.otp}}
31+
elixir-version: ${{matrix.elixir}}
32+
33+
- name: Restore dependencies cache
34+
uses: actions/cache@v4
35+
with:
36+
path: deps
37+
key: ${{ runner.os }}-mix-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
38+
restore-keys: |
39+
${{ runner.os }}-mix-${{ matrix.otp }}-${{ matrix.elixir }}-
40+
41+
- name: Install dependencies
42+
run: mix deps.get
43+
44+
- name: Compile strict
45+
run: mix compile --warnings-as-errors
46+
47+
- name: Run tests
48+
run: mix test

0 commit comments

Comments
 (0)