-
Notifications
You must be signed in to change notification settings - Fork 3
72 lines (63 loc) · 1.66 KB
/
testing-data-import.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
name: Data Import Tests
on:
push:
paths:
- 'data/**'
- '.github/workflows/testing-data-import.yml'
workflow_dispatch:
env:
NODE_ENV: test
DB_HOST: localhost
DB_USERNAME: landgriffon
DB_PASSWORD: landgriffon
DB_DATABASE: landgriffon
API_POSTGRES_HOST: localhost
API_POSTGRES_PORT: 5432
API_POSTGRES_USERNAME: landgriffon
API_POSTGRES_PASSWORD: landgriffon
API_POSTGRES_DATABASE: landgriffon
GMAPS_API_KEY: secretApiKey
jobs:
data-import-test:
name: Data Import Tests
runs-on: ubuntu-latest
services:
postgres:
image: vizzuality/landgriffon-database:latest
ports:
- 5432:5432
env:
POSTGRES_USER: landgriffon
POSTGRES_PASSWORD: landgriffon
POSTGRES_DB: landgriffon
redis:
image: redis
ports:
- 6379:6379
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: './api/.nvmrc'
- name: Install API dependencies
working-directory: api
run: yarn install
- name: Prepare database
working-directory: api
run: yarn test:db-prepare
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
working-directory: data
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Data Import tests
working-directory: data/test
run: |
pytest