-
Notifications
You must be signed in to change notification settings - Fork 7
45 lines (35 loc) · 1.1 KB
/
api_test.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
name: API Test
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
jobs:
test:
runs-on: ubuntu-20.04
if: github.event.pull_request.draft == false
timeout-minutes: 60
env:
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.LULCCI_ASCS }}
steps:
- uses: actions/checkout@v3
- name: Docker Pull
run: docker-compose pull
- name: Docker Layer Caching
uses: satackey/[email protected]
continue-on-error: true
- name: Docker Build
run: docker-compose up --build -d postgis
- name: Docker API Build
run: docker build -t api services/api
- name: Docker API Lint
run: docker run api sh -c "npm install --include=dev && npm run lint"
- name: Docker API Test
run: docker run --network pearl-backend_default
-e "Postgres=postgres://docker:docker@postgis:5432/gis"
-e "AZURE_STORAGE_CONNECTION_STRING=${{ secrets.LULCCI_ASCS }}"
api npm test
- name: Docker Cleanup
run: docker-compose kill