-
-
Notifications
You must be signed in to change notification settings - Fork 145
81 lines (79 loc) · 2.52 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
name: CI
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
prettier:
name: Prettier
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install Prettier
run: npm install --global prettier
- name: Run Prettier
run: prettier --check --no-error-on-unmatched-pattern "**/*.{json,md,yml,yaml}"
check:
name: Format/Credo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: "1.17.2"
otp-version: "27.0.1"
- name: Restore dependencies cache
uses: actions/cache@v3
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Install dependencies
run: mix deps.get
- name: Run formatter
run: mix format --check-formatted
- name: Run Credo
run: mix credo
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: "1.17.2"
otp-version: "27.0.1"
- name: Restore dependencies cache
uses: actions/cache@v3
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Install dependencies
run: mix deps.get
- name: Run tests
env:
ADM_OAUTH2_CLIENT_ID: ${{ secrets.ADM_OAUTH2_CLIENT_ID }}
ADM_OAUTH2_CLIENT_SECRET: ${{ secrets.ADM_OAUTH2_CLIENT_SECRET }}
APNS_AUTH_KEY_P8: ${{ secrets.APNS_AUTH_KEY_P8 }}
APNS_CERT: ${{ secrets.APNS_CERT }}
APNS_JWT_KEY_IDENTIFIER: ${{ secrets.APNS_JWT_KEY_IDENTIFIER }}
APNS_JWT_TEAM_ID: ${{ secrets.APNS_JWT_TEAM_ID }}
APNS_KEY_UNENCRYPTED: ${{ secrets.APNS_KEY_UNENCRYPTED }}
APNS_TOPIC: ${{ secrets.APNS_TOPIC }}
FCM_PROJECT: ${{ secrets.FCM_PROJECT }}
FCM_SERVICE_ACCOUNT_JSON: ${{ secrets.FCM_SERVICE_ACCOUNT_JSON }}
GCM_KEY: ${{ secrets.GCM_KEY }}
VALID_APNS_TOKEN: ${{ secrets.VALID_APNS_TOKEN }}
VALID_GCM_REG_ID: ${{ secrets.VALID_GCM_REG_ID }}
run: mix test