-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (49 loc) · 1.46 KB
/
server.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
name: Server
on: [push]
jobs:
client:
defaults:
run:
working-directory: web
name: Client Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- uses: actions/setup-node@v1
with:
node-version: '14.x'
- run: yarn install --frozen-lockfile --network-timeout 300000
- run: yarn lint
- run: yarn build
server:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.9]
steps:
- uses: harmon758/postgresql-action@v1
with:
postgresql version: '12'
postgresql db: 'nmdc'
postgresql user: 'nmdc'
postgresql password: 'nmdc'
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Create environment
run: |
echo 'export NMDC_DATABASE_URI="postgresql://nmdc:nmdc@localhost:5432/nmdc"' >> .env
echo 'export NMDC_TESTING_DATABASE_URI="postgresql://nmdc:nmdc@localhost:5432/nmdc"' >> .env
echo 'export NMDC_MONGO_USER="${{ secrets.NMDC_MONGO_USER }}"' >> .env
echo 'export NMDC_MONGO_PASSWORD="${{ secrets.NMDC_MONGO_PASSWORD }}"' >> .env
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: tox