-
Notifications
You must be signed in to change notification settings - Fork 8
103 lines (96 loc) · 3.15 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Elixir CI
on:
# Allow to trigger the workflow manually again via the GitHub UI
# @see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_call
workflow_call:
# Allow to trigger the workflow manually via the GitHub UI and also allow to
# select a custom branch
# @see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch
workflow_dispatch:
# Trigger the workflow when a pull_request's activity type is opened,
# synchronize, or reopened.
# @see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
pull_request:
types: [opened, reopened, review_requested]
# Trigger the workflow when a pull request review is submitted (approved and
# other states)
# @see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_review
pull_request_review:
types: [submitted]
# Trigger the workflow on push
# @see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push
push:
# Runs "At 00:00" (see https://crontab.guru/#0_0_*_*_*)
# @see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
schedule:
- cron: "0 0 * * *"
jobs:
deps:
name: mix deps.get
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: team-alembic/staple-actions/actions/mix-deps-get@main
auditor:
name: mix hex.audit
runs-on: ubuntu-latest
needs: deps
steps:
- uses: actions/checkout@v3
- uses: team-alembic/staple-actions/actions/mix-hex-audit@main
build-test:
name: MIX_ENV=test mix.compile
runs-on: ubuntu-latest
needs: deps
steps:
- uses: actions/checkout@v3
- uses: team-alembic/staple-actions/actions/install-elixir@main
- uses: team-alembic/staple-actions/actions/mix-compile@main
with:
mix-env: test
formatter:
name: mix format --check-formatted
runs-on: ubuntu-latest
needs: build-test
steps:
- uses: actions/checkout@v3
- uses: team-alembic/staple-actions/actions/mix-format@main
with:
mix-env: test
credo:
name: mix credo --strict
runs-on: ubuntu-latest
needs: build-test
steps:
- uses: actions/checkout@v3
- uses: team-alembic/staple-actions/actions/mix-credo@main
with:
mix-env: test
unused-deps:
name: mix deps.unlock --check-unused
runs-on: ubuntu-latest
needs: build-test
steps:
- uses: actions/checkout@v3
- uses: team-alembic/staple-actions/actions/mix-task@main
with:
mix-env: test
task: deps.unlock --check-unused
test:
name: mix test
runs-on: ubuntu-latest
needs: build-test
steps:
- uses: actions/checkout@v3
- uses: team-alembic/staple-actions/actions/mix-test@main
with:
mix-env: test
build-dev:
name: MIX_ENV=dev mix.compile
runs-on: ubuntu-latest
needs: deps
steps:
- uses: actions/checkout@v3
- uses: team-alembic/staple-actions/actions/mix-compile@main
with:
mix-env: dev