Skip to content

Commit c589c15

Browse files
authored
Merge pull request #4349 from nulib/deploy/staging
Deploy vX.X.X to production
2 parents d3f4afc + 4c460c4 commit c589c15

File tree

14 files changed

+1355
-1076
lines changed

14 files changed

+1355
-1076
lines changed

.github/workflows/test.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
otp-version: "26"
2222
elixir-version: "1.15.4"
2323
- name: Cache Elixir dependencies
24-
uses: actions/cache@v2
24+
uses: actions/cache@v4
2525
with:
2626
path: |
2727
app/deps
@@ -30,7 +30,7 @@ jobs:
3030
${{ runner.os }}-hex-v6-${{ hashFiles('app/mix.lock') }}
3131
${{ runner.os }}-hex-v6-
3232
- name: Cache Elixir build
33-
uses: actions/cache@v2
33+
uses: actions/cache@v4
3434
with:
3535
path: |
3636
app/_build
@@ -40,7 +40,7 @@ jobs:
4040
${{ runner.os }}-hex-v6-${{ hashFiles('app/mix.lock') }}
4141
${{ runner.os }}-hex-v6-
4242
- name: Cache JS dependencies
43-
uses: actions/cache@v2
43+
uses: actions/cache@v4
4444
with:
4545
path: |
4646
app/assets/node_modules
@@ -75,7 +75,7 @@ jobs:
7575
with:
7676
node-version-file: ./.tool-versions
7777
- name: Cache Elixir dependencies
78-
uses: actions/cache@v2
78+
uses: actions/cache@v4
7979
with:
8080
path: |
8181
app/deps
@@ -85,7 +85,7 @@ jobs:
8585
${{ runner.os }}-hex-v6-${{ hashFiles('app/mix.lock') }}
8686
${{ runner.os }}-hex-v6-
8787
- name: Cache Elixir build
88-
uses: actions/cache@v2
88+
uses: actions/cache@v4
8989
with:
9090
path: |
9191
app/_build
@@ -95,7 +95,7 @@ jobs:
9595
${{ runner.os }}-hex-v6-${{ hashFiles('app/mix.lock') }}
9696
${{ runner.os }}-hex-v6-
9797
- name: Cache JS dependencies
98-
uses: actions/cache@v2
98+
uses: actions/cache@v4
9999
with:
100100
path: |
101101
app/assets/node_modules
@@ -192,7 +192,7 @@ jobs:
192192
perl Makefile.PL && \
193193
sudo make install
194194
- name: Cache Elixir dependencies
195-
uses: actions/cache@v2
195+
uses: actions/cache@v4
196196
with:
197197
path: |
198198
app/deps
@@ -201,7 +201,7 @@ jobs:
201201
${{ runner.os }}-hex-v6-${{ hashFiles('app/mix.lock') }}
202202
${{ runner.os }}-hex-v6-
203203
- name: Cache Elixir build
204-
uses: actions/cache@v2
204+
uses: actions/cache@v4
205205
with:
206206
path: |
207207
app/_build
@@ -211,7 +211,7 @@ jobs:
211211
${{ runner.os }}-hex-v6-${{ hashFiles('app/mix.lock') }}
212212
${{ runner.os }}-hex-v6-
213213
- name: Cache JS dependencies
214-
uses: actions/cache@v2
214+
uses: actions/cache@v4
215215
with:
216216
path: |
217217
app/assets/node_modules

README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,35 @@ If you would like to interact directly with the database
5656

5757
### Run the Elixir test suite
5858

59-
- run `mix test`
59+
#### Start Test Services
60+
61+
In one terminal:
62+
```
63+
cd infrastructure/localstack
64+
docker compose up
65+
```
66+
67+
#### Provision Test Environment
68+
69+
Watch the logs until the services seem to stabilize. Then, in another terminal:
70+
```
71+
cd infrastructure/localstack
72+
terraform init
73+
terraform apply -auto-approve \
74+
-var-file test.tfvars \
75+
-var localstack_endpoint=https://localhost.localstack.cloud:4566
76+
```
77+
78+
You will probably see `Warning: AWS account ID not found for provider`, but this can be safely ignored.
79+
80+
#### Run Tests
81+
82+
```
83+
cd app
84+
mix test [test args...]
85+
```
86+
87+
**Note:** `mix test` can be run repeatedly without re-provisioning as long as the Docker services are running. If you stop the services, you will need to run Terraform again.
6088

6189
### GraphQL API
6290

0 commit comments

Comments
 (0)