-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (100 loc) · 2.84 KB
/
elixir.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
104
name: Elixir CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
MIX_ENV: test
jobs:
bdd:
name: BDD
runs-on: ubuntu-latest
services:
db:
image: postgres:latest
ports: ['5432:5432']
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-elixir@885971a72ed1f9240973bd92ab57af8c1aa68f24
with:
elixir-version: '1.12' # Define the elixir version [required]
otp-version: '24' # Define the OTP version [required]
- name: Restore dependencies cache
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install Chrome
run: |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
- run: google-chrome --version
- name: Install Chrome driver
uses: nanasess/setup-chromedriver@master
with:
chromedriver-version: '95.0.4638.54'
- name: Run BDD tests
run: |
chromedriver --version
export DISPLAY=:99
chromedriver &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
mix archive.install hex phx_new --force
mix deps.get
mix ecto.create
mix ecto.reset
mix white_bread.run
tdd:
name: TDD
runs-on: ubuntu-latest
services:
db:
image: postgres:latest
ports: ['5432:5432']
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-elixir@885971a72ed1f9240973bd92ab57af8c1aa68f24
with:
elixir-version: '1.12' # Define the elixir version [required]
otp-version: '24' # Define the OTP version [required]
- name: Restore dependencies cache
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Run TDD tests
run: |
mix archive.install hex phx_new --force
mix deps.get
mix ecto.create
mix ecto.reset
mix test